Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 08/26/25 in all areas

  1. Whilst there are many Delphi components for detecting changes to file system folders they suffer from serious limitations: typically they only allow you to monitor a single folder they do not support the monitoring of specific files they rely on the FindFirstChangeNotification API which gives no information about what has changed, requiring an inefficient search. I have created a new file system monitoring library that addresses the above limitations. Features: Easy to use, but also suitable for heavy duty monitoring Single unit with no external dependencies Allows monitoring folders and/or specific files Uses the ReadDirectoryChangesW API which provides information about what exactly was changed A single instance of the component can handle the monitoring of many folders and/or files Uses an I/O completion port for efficient handling of large numbers of requests A single thread handles all requests A different notification handler can be specified for each request You can have multiple handlers for each folder or file When you monitor folders you can specify whether you want to also monitor subfolders Installation: You do not need to install the library. Just download or clone the repo and add the source subdirectory to the Library path. Usage: procedure TForm1.FormCreate(Sender: TObject); begin // Create the IFileSystemMonitor interface FFileSystemMonitor := CreateFileSystemMonitor; // Monitor a directory FFileSystemMonitor.AddDirectory(TPath.GetTempPath, False, HandleChange); // Also monitor a specific file FFileSystemMonitor.AddFile('pathtoyourfile', HandleChange); end; procedure TForm1.HandleChange(Sender: TObject; const Path: string; ChangeType: TFileChangeType); begin with lvEventList.Items.Add do begin Caption := GetEnumName(TypeInfo(TFileChangeType), Integer(ChangeType)); SubItems.Add(Path); end; end; To stop monitoring a specific file or folder you use the following methods: function RemoveDirectory(const Directory: string; OnChange: TMonitorChangeHandler): Boolean; function RemoveFile(const FilePath: string; OnChange: TMonitorChangeHandler): Boolean;
  2. corneliusdavid

    XCode with Delphi 12.3

    @Dave Nottage, thanks for the clarification. It's been the rule of thumb I've used for the little bits of Apple dev I've done but I didn't consider older versions of Delphi or CE.
  3. Dave Nottage

    XCode with Delphi 12.3

    This is not necessarily true given past experience, however it has been true for a while now. Having said that, even if you discover that your install of Delphi does not work with the latest version of Xcode, it is possible to revert to an earlier one. It should be borne in mind however that (at time of writing) App Store requires at least Xcode 16. Side note: those using Delphi CE will find that (at time of writing) it will not work with Xcode 16 unless you take special measures.
  4. DelphiUdIT

    Compiler directives for line number?

    With the same function you can get also the procedure name ' TForm1.Button1Click', instead to write it like a constant: GetLocationInfo(ReturnAddress).ProcedureName Think to use a temporary record and call GetLocationInfo only one time.
  5. Hi all, I have just uploaded the project EdgeAudio integrate mic capture, audio playback, a high‑pass filter, VAD, hysteresis, and a “Talkover” mode from Delphi, orchestrated through a bidirectional JS bridge inside TEdgeBrowser. The architecture centers on TEdgeAudioControl and TAudioSettings, applied in real time on the WebAudio side, with clean VCL integration (virtual host, typed events). Key points Clear architecture: capture (TEdgeAudioCapture), playback (TEdgeAudioPlayer with VAD/Talkover), filtering (THighPassFilter), and a WebView2 bridge; TEdgeAudioControl exposes settings and ready‑to‑use events. Extensible event engine: aggregates/routes JSON events (audio_play, audio_pause, audio_segment, etc.) via TEventEngineManager and IAudioEventHandler. Capabilities: tunable VAD (threshold/silenceMs/timeslice), Talkover with cooldown/ratios to avoid “ping‑pong,” playback/streaming (play/pause/seek/stop), setSinkId, volume boost, built‑in notifications/animations, and optional auto‑blocking of capture during playback. Quick start Install the EdgeAudioDesign.dproj package to register TEdgeAudioControl in the Palette. Two paths: (1) already have TEdgeBrowser → use the Edge.Audio unit; (2) drop TEdgeAudioControl. Copy the web/tools folders into your project and place WebView2Loader.dll (x86/x64) next to the executable. Sample projects (AudioEdgeTest1/2.zip) are provided; add “EDGEAUDIO\SOURCE” (and “OPENAI\SOURCE”) to your project search paths. Dependencies: Delphi 12+, WebView2 Runtime, and ffmpeg if you need audio conversion (configurable ffmpegPath). Learn more Diagrams, event flow, and extension points are detailed in the “Dev note – Architecture & Mechanics” sections and the deep‑dive in the repo. Preview
×