MP3 Playing in OpenAL

pisces 101 Mar 23, 2004 at 11:57

Hiya all,
I need help once again :S

I read in the openAL guide and saw only wav files can be loaded… is there any way to load in mp3’s as well…
I know FMOD does it… but havent really looked at it that much…


3 Replies

Please log in or register to post a reply.

anubis 101 Mar 23, 2004 at 17:14

take my advice and use ogg. there even is a complete tutorial on how to do that.…als/lesson8.php

SpreeTree 101 Mar 23, 2004 at 17:28

Mp3’s are not supported directly by OpenAL, but they can be read in, as can all music files. You would have to know about the file format, compression methods, and then convert all this into a sound buffer format that OpenAL could use.

Why do you want to use mp3’s? Theres a whole bunch of legal crap associated with mp3’s, so if its for the file size aspect, then go with what anubis said and use ogg files. Ogg files are supported directly in OpenAL (currently in the Linux version, and soon to be in the win32 version. Dont know about the mac version etc.), and have just as good data compression and lossy-ness(!) as mp3’s.

I can’t think of why else someone would want to use mp3’s, and yeah theres a raft of tutorials out there on ogg vorbis (2 on here, the ogg vorbis sdk docs). Google it…:)


pisces 101 Mar 23, 2004 at 18:20

thanks. There’s no reason about the mp3s… just curiosity. I’m having a look for the Ogg thingy. Thanks again