Jump to content
  • Advertisement
Sign in to follow this  
Ademan555

Open AL and mp3's

This topic is 4947 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Well, i was listening to some of my music the other day, and i decided it would be pretty cool to put some of my music to my games, and of course, that left me with a few options, im using openAL, and alut gives you wav loading right off the bat, which is pretty cool considering ive been unable to find a description of the file format. But of course, a wav of a song would be... huge... to say the least, so i was wondering if anyone knows where either of these things are: a mp3 loader for openAL (actually, as long as it returns the right information, the intended API doesnt matter) or a description of the mp3 file format thanks -Dan

Share this post


Link to post
Share on other sites
Advertisement
You can probably find an mp3 decoding library around the place which can produce a raw PCM data stream for OpenAL, however I wouldnt bother, MP3 has licencing requirements and I'm not even sure if they are wavied for free projects, certainly not for ones you charge for.

Also, if you ever plan to charge money for a project FMOD costs cash as well [smile]

Instead, I'd look into Ogg-Vorbis, its a free file format for compressed files much like mp3 (infact, at lower bit rates its better than MP3) and has other features (and has just hit V1.0 it seems).
There are even not one but two tutorials on getting it going with OpenAL

Share this post


Link to post
Share on other sites
Quote:
Original post by _the_phantom_
You can probably find an mp3 decoding library around the place which can produce a raw PCM data stream for OpenAL, however I wouldnt bother, MP3 has licencing requirements and I'm not even sure if they are wavied for free projects, certainly not for ones you charge for.

Also, if you ever plan to charge money for a project FMOD costs cash as well [smile]

Instead, I'd look into Ogg-Vorbis, its a free file format for compressed files much like mp3 (infact, at lower bit rates its better than MP3) and has other features (and has just hit V1.0 it seems).
There are even not one but two tutorials on getting it going with OpenAL


They do charge money for using MP3 technology in free game projects. I sent the company who holds the license an e-mail and asked them this question myself, so I would definitely stay away from using MP3s in your game, unless you are willing to cough up $2,000 to license the technology.


I use OGG Vorbis in my game and it works great. Its just as good (if not better) than MP3s in terms of quality and compression. I also recommend you use that format for your game.

Share this post


Link to post
Share on other sites
for some reason i was under the impression that the liscense only cost money if you're ENCODING not decoding, but of course... ive been wrong before :-D. I might look into ogg, i just remember at one time i was having a hell of a time looking for an mp3-> ogg converter, i think i ended up with a 30 day trial of something


anywho, thanks
-Dan

Share this post


Link to post
Share on other sites
tbh, mp3=>ogg conversion isnt a great idea, both systems use a slightly different method of removing the redundant data, so as they are both lossy the mp3 would remove one lot, the ogg would remove another can it could end up sounding quite bad

Share this post


Link to post
Share on other sites
MP3 -> OGG is definitely a bad idea. You need to take the original PCM data and convert that to OGG format. Like the phantom said, those two formats use different compression schemes. They remove different sets of data, so if you convert from WAV to MP3 then it removes data X. Following that, you convert from MP3 to OGG, it removes data Y. So you get craptacular sound quality.

Share this post


Link to post
Share on other sites
hi, i never coded before in c++ (learning) and i was going to make adding ogg vorbis to a game engine as my first project, but as i unravel whats to be done i see a lot. i have a little question for ya guys. ogg takes up some cpu to decode right? but how much exactly. because if i play many tracks at the same time and using lots of cpu won't be good. i saw that some people got the ipod to play ogg with 87% realtime on a linux kernel(that runs on the ipod) ...

Share this post


Link to post
Share on other sites
Hmmmm, strange things have been said in this topic.
In my current project I use FMOD (which comes with mp3 support and is free for non commerical use) and I'm planning to load and play mp3 sounds and music. From what Phantom and Roots have said it looks that I should pay license fee for using mp3. Is this correct (if yes, then OMG... :-/ ) or have I just not properly understood your posts and you meant ie. plugin for OpenAL for loading mp3...?

Share this post


Link to post
Share on other sites
Right, I've just had a shifty about the place and apprently if you shift less than 5000 copies of a game then you dont have to worry about licensing.

This page has all the details.

Personally, I'd be inclinded to just use Ogg anyways and not have to worry [smile]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!