Best way to store music?

Started by
15 comments, last by Promit 16 years, 11 months ago
Quote:Original post by TheAdmiral
Forget about MP3. You need a licence to use it in a commercial application and its inferior to OGG in every way that counts.
Everything but encoding voice tracks.

-------Harmotion - Free 1v1 top-down shooter!Double Jump StudiosBlog
Advertisement
Thanks for your help! Could anyone point me to an example of a DirectX application that plays an OGG file?
This should help, if not, remember google is your friend, take a look at some more results

Good Luck,
David
I forgot to mention I'm not using managed DirectX or .NET or anything like that.

I looked at the Google results and have done some more searching but now I'm just confused again. What OGG libraries do I need to download? How do I stream an OGG to DirectSound? Isn't there a standard way of doing this?? I'm really surprised that there seem to be no tutorials on the subject...
Go HERE and grab the latest stable build. You will need their code to convert from a file.ogg to a byte stream. Then you will need a good knowledge of DirectSound (or possibly DirectMusic) to upload the data to the card and play.

They didn't have the best documentation when I was doing it. There are only a few function calls you need to worry about:
ov_open, ov_info, ov_read, and ov_clear

I programmed an Ogg loader into DirectSound almost a year ago. I'm not sure how much the Ogg/Vorbis stuff has changed since then. I had a few problems with file format, some of the functions were failing because I didn't have the correct Ogg format (as best I can remember). The website distributes a simple EXE that makes Ogg files for you. Everything has been peachy with it since then.
-------Harmotion - Free 1v1 top-down shooter!Double Jump StudiosBlog
I'm gonna make the obligatory FMOD mentioning. FMOD will do everything you want with regard to audio and it will do it faster than you could, easier, and it's free/cheap depending on your needs. .OGG files are no problem, of course, and I love the OXM (XM tracker files with OGG compressed samples) support. It will take care of mixing your sound effects and whatnot in as well, using the best available algorithms, and has been tested and debugged on a huge range of systems/sound cards. The API is ridiculously easy to use as well. My FMOD site license purchase was a trivially easy decision!
Quote:Original post by blaze02
Quote:Original post by TheAdmiral
Forget about MP3. You need a licence to use it in a commercial application and its inferior to OGG in every way that counts.
Everything but encoding voice tracks.
Of course if you're dealing with voice, you're better off with Speex anyway.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.

This topic is closed to new replies.

Advertisement