Is MP3 best?
Which format is better to use in a game (as far as memory, sound quality, and ease of programming)? MP3, CDA, WAV or something else?
Also how would you load that in a game (example code or link to one would be helpful)?
Well, in order to use MP3 in a game that is going to be published, you gotta shell out $2500 to get a licence for it. Ya see, MP3 is a patented technology...
Frankly, for most applications, just stick with WAV. They are easy to use and DX supports it out-of-the-box. Even better would be to hide your sound code in a class manager. Then you could use WAV to start with and then swap out modules for other formats later on.
Landsknecht
Frankly, for most applications, just stick with WAV. They are easy to use and DX supports it out-of-the-box. Even better would be to hide your sound code in a class manager. Then you could use WAV to start with and then swap out modules for other formats later on.
Landsknecht
My sig used to be, "God was my co-pilot but we crashed in the mountains and I had to eat him..."
But folks whinned and I had to change it.
But folks whinned and I had to change it.
quote: Original post by Landsknecht
Well, in order to use MP3 in a game that is going to be published, you gotta shell out $2500 to get a licence for it. Ya see, MP3 is a patented technology...
Landsknecht
Are you sure about this? I thought using DirectShow to play MP3 is perfectly legal even in commercial applications.
Also, MP3 is a compressed format, which means you have to decompress durring runtime adding processing time to your Gameloop, if your game is already processing intensive you might want to stay away from it.
a good alternatve option is the Ogg Vorbis format is pretty close to MP3, and there are no strings attached.
a good alternatve option is the Ogg Vorbis format is pretty close to MP3, and there are no strings attached.
Decoding do not need a license. But encoding need it.
....er... izit correct?
....er... izit correct?
"after many years of singularity, i'm still searching on the event horizon"
I think you do need a licence for using the compresion/decompression algorithm in your programs, if you use MS directshow they already payed the licence for you, so you dont have to pay, however if you implement your own routine, you do have to pay, I am not sure so dont quote me on this.
the way it works is this. if you have an app that uses your own mp3 decoding that you wrote. you pay a liscence fee. if you use a library from a 3rd party, then you dont pay a fee, but more then likly you have to pay a fee to use the library so it evens out anyway. you can use directshow, then you dont have to worry about fees since you dont even have to distribute the mp3 decoding routines with your app since they are a part of windows and MS kindly paid the fee for you. though if you want a better format for gaming purposes, try ogg vorbis. its patent free, and allows per sample seeking and supports better looping then mp3 does. however i would only use ogg vorbis or mp3 for background music. sound effects should be wav files.
figured i would repeat what was said so that you know more then one person believes this to be true.
figured i would repeat what was said so that you know more then one person believes this to be true.
Actually, even with a library you still have to pay the licence. Go to the site for Fmod. It gets mentioned there. Even though MP3 encoding/decoding is included in the sound system, to actually USE it requires a $2500 licence to the labs that have the patent... Which realy sucks.
Landsknecht
Landsknecht
My sig used to be, "God was my co-pilot but we crashed in the mountains and I had to eat him..."
But folks whinned and I had to change it.
But folks whinned and I had to change it.
I know Ogg Vorbis sounds like the way to go here, but has anyone actually managed to get it going with DirectSound? I know that technically this is DirectX related, but I''m just curious to know how one would go about linking it into an existing sound API. (The only real API I could think of was DirectX Damn you Microsoft)
--------------------------www.4bitterguys.com
quote: Original post by a1studmuffin
I know Ogg Vorbis sounds like the way to go here, but has anyone actually managed to get it going with DirectSound? I know that technically this is DirectX related, but I''m just curious to know how one would go about linking it into an existing sound API. (The only real API I could think of was DirectX Damn you Microsoft)
I can use Ogg Vorbis perfectly in OpenAL, which is an "existing sound API" . You can just do it manually with VorbisFile and whatever DirectSound uses for streaming audio.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement