Home » Community » Newbie corner » How i can play a sound?? wav,mp3,ogg,aiff???? (is there an easy manner to play a sound???)
How i can play a sound?? wav,mp3,ogg,aiff???? [message #52033] |
Mon, 08 July 2019 22:16  |
fasasoftware
Messages: 15 Registered: July 2019 Location: Italy
|
Promising Member |
|
|
Hi to everybody....
is there an easy manner to play a sound??? with a library?? or without???
i need to complete my programs....do you have some fresh code???wav,mp3,ogg,aiff????
i have tryed either in mac and windows...but nothing works...about sounds.....sorry i'm a newbie...
i thank you a lot in advance....Lestroso
|
|
|
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: 726 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: Tue May 13 11:22:25 CEST 2025
Total time taken to generate the page: 0.01059 seconds
|