PDA

View Full Version : Ubuntu C++ ogg sound



ownsuall
June 9th, 2010, 03:05 AM
How would you play an ogg file via c++ in ubuntu?

Axos
June 9th, 2010, 03:35 AM
The quick 'n' dirty way is to fork and exec a program like /usr/bin/paplay to play the file for you.

If you prefer to do it the hard way (and have more control), take a look at:

http://gstreamer.freedesktop.org/

Edit: I should have explained that the gstreamer runtime libraries are already included with Ubuntu. To compile programs which use gstreamer you'll need to install the development package (libgstreamer0.10-dev, I believe).

ownsuall
June 10th, 2010, 04:23 AM
Yeah but i doesn't look like it can do 3d sound.. I need 3d sound for my project though.