MP3 Playing in OpenAL

E037d62d69a0f0932dbcb47ed6e130bb
0
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…

Thanks

3 Replies

Please log in or register to post a reply.

F7a4a748ecf664f189bb704a660b3573
0
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.

http://www.devmaster.net/articles/openal-t…als/lesson8.php

F3ff2088fe22d64396b949f149628107
0
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…:)

Spree

E037d62d69a0f0932dbcb47ed6e130bb
0
pisces 101 Mar 23, 2004 at 18:20

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

Pisces