C++ - Loading Mp3's?

Started by
10 comments, last by stealth 19 years, 7 months ago
Are there libraries or something that I can use to do this? , I wanna be able to load or read the mp3 in and play it while I'm reading it in , something like that , or if anyone can give me a link that discusses mp3's that'd be cool , I wanna be able to use mp3's of different qualities
Advertisement
To use MP3s in C++, you'll need to use a library like fmod or the OggVorbis library - [example]
use free OGG format instead of MP3
Triglav - Member of TAJGA Team
thanks , but I thort FMod only did 128kbps mp3's at the highest rate? , I'll check these out anyway , if theres any more info I can have it'd be appreciated

cheers

Stealth
are there no libraries that let me load any mp3 file regardless of quality?.. cause as far as I can see.. well from what I've read FMOD only lets u play 128kbps mp3 files .. I wanna be able to use 192 and all the rest
Quote:Original post by stealth
are there no libraries that let me load any mp3 file regardless of quality?.. cause as far as I can see.. well from what I've read FMOD only lets u play 128kbps mp3 files .. I wanna be able to use 192 and all the rest


I searched the FMOD site and I was unable to find any mention of a restriction on mp3 bit rates (of course that doesn't it doesn't exist). I don't know how committed you are to using to mp3, but as a previous poster suggested you might consider switching to an open codec like Ogg.
Patrick
Further to the other posters comments, I can find no mention of the 128kbits/sec limitation on the FMOD site either. Just fyi.

I've never heard of it being limited in this way. Where are you getting this (mis)information from?

The thing with MP3 is that, to use it legally, you have to pay a royalty to even decode the MP3 data (currently it's $0.75 per "unit" that does the decoding). Check out this page to get an idea of what royalties are required if you use MP3 encoding/decoding in PC software applications. If you really want to work with audio data that requires a good compression to quality trade-off that's similar to MP3, check out Ogg Vorbis.

With direct show you're able to load MP3's. I did it a long time ago, but if i recall correct it was pretty easy.



lgpl, so you can link with the dll, and keep your project commercial, or whatever.

http://www.lokigames.com/development/smpeg.php3

you'll also need SDL (used for cross platform sound)

This topic is closed to new replies.

Advertisement