TsgcAudioPlayerMCI › Methods › Play
Plays the specified audio file (wav or mp3) through MCI.
void __fastcall Play(const UnicodeString aFileName);
| Name | Type | Description |
|---|---|---|
aFileName | const String | Full path to the audio file to play. Supported formats include wav and mp3. |
Opens the file through the Windows Media Control Interface (MCI) and starts playback asynchronously. Internally the component issues an MCI open followed by a play ... notify command, so control returns immediately to the caller. The OnStart event is raised when playback begins, and OnStop is raised when the MCI device signals that playback has finished. Only Windows is supported.