TPlaySound
From Lazarus wiki
Jump to navigationJump to search
TPlaySound is a component to play WAV files in Windows, Linux and MacOS.
Usage
- Set the SoundFile property to the path of your WAV file
- Set the PlayStyle to psAsync or psSync
- Call the Execute method
playsound1.execute;
Note: Usually PlayCommand shall be left empty. This way TPlaysound will try to autodected an available method for playing (for Linux). If the value is not empty, a forced play method will be used, and if it is not available, an exception will be thrown.
Download
- TPlaySound is available from the Lazarus CCR Repository.
I can also be installed directly from the Lazarus IDE: Main Menu — Package — Online Package Manager — PlaysoundPackage.
- AFter installation it is present in the LazControls tab.
