Does openal play mp3?
Hi! I want to play mp3 files with openal for background track. But how can I do that. At the moment I play .wav.
I''m trying to load mp3 to get several minutes in the sound track with out that memory impact. Is that the way for large background musics in game or there is another memory friendly way to handle it with openal?
Any comment will be welcome!
Decode the MP3 into PCM data using some MP3 decoding library. To stream it, take advantage of OpenAL''s buffer queue. When the data remaining to be played starts to run low, load and decode some more data and queue it (possibly using another thread to monitor and handle that). I''m relatively sure there''s a couple streaming-with-OpenAL tutorials around, combine them with whatever MP3 decoding library you learn to use.
Of course, the hard part is decoding the MP3 into PCM, since you need a license to do that, and they are rather costly.
Might want to look into Ogg Vorbis.
Might want to look into Ogg Vorbis.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
For games, the going rate for using MP3 is $2,500 per title.
http://www.mp3licensing.com/royalty/
Now, I''m not suggesting that it is thoroughly evil to obtains patents on a system, make it available royalty-free, wait until the system is widely used, and then start demanding royalties. But I wouldn''t use MP3.
http://www.mp3licensing.com/royalty/
Now, I''m not suggesting that it is thoroughly evil to obtains patents on a system, make it available royalty-free, wait until the system is widely used, and then start demanding royalties. But I wouldn''t use MP3.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement