TsgcAudioPlayerMCIMethods › Play

Play Method

Plays the specified audio file (wav or mp3) through MCI.

Syntax

void __fastcall Play(const UnicodeString aFileName);

Parameters

NameTypeDescription
aFileNameconst StringFull path to the audio file to play. Supported formats include wav and mp3.

Remarks

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.

Example

Back to Methods