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???)
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: 538
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");
 
Read Message
Read Message
Previous Topic: Image Ctrl How To Add It???
Next Topic: CTRL + C = 659 Heap leaks
Goto Forum:
  


Current Time: Fri May 29 11:06:24 CEST 2020

Total time taken to generate the page: 0.00826 seconds