Home » Community » Newbie corner » How i can play a sound?? wav,mp3,ogg,aiff???? (is there an easy manner to play a sound???)
Re: How i can play a sound?? wav,mp3,ogg,aiff???? [message #52061 is a reply to message #52033] |
Fri, 12 July 2019 13:33 |
Didier
Messages: 680 Registered: November 2008 Location: France
|
Contributor |
|
|
Hi fasasoftware,
I only used sound once to play some wav extracts and I simply used the system command and a player
Here is a sample code used in linux:
void MyPLayerUtilityClass::playFileCB(String file)
{
String cmd("pkill aplay"); // to be sure to stop other sample already playing
DoSystemCall(cmd.Begin());
cmd = "aplay ";
cmd += file;
cmd += " &";
DoSystemCall(cmd.Begin());
}
playSoundButton <<= THISBACK1(playFileCB, "path/MySample.wav");
|
|
|
Goto Forum:
Current Time: Fri Apr 26 05:36:57 CEST 2024
Total time taken to generate the page: 0.04551 seconds
|