Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to next message
fasasoftware is currently offline  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 Go to previous message
Didier is currently offline  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");
Previous Topic: Image Ctrl How To Add It???
Next Topic: CTRL + C = 659 Heap leaks
Goto Forum:
  


Current Time: Fri Mar 29 06:39:09 CET 2024

Total time taken to generate the page: 0.01650 seconds