Jump to content


MP3 Playing in OpenAL


3 replies to this topic

#1 pisces

    New Member

  • Members
  • Pip
  • 4 posts

Posted 23 March 2004 - 11:57 AM

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

#2 anubis

    Senior Member

  • Members
  • PipPipPipPip
  • 2225 posts

Posted 23 March 2004 - 05:14 PM

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
If Prolog is the answer, what is the question ?

#3 SpreeTree

    Valued Member

  • Members
  • PipPipPip
  • 265 posts

Posted 23 March 2004 - 05:28 PM

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

#4 pisces

    New Member

  • Members
  • Pip
  • 4 posts

Posted 23 March 2004 - 06:20 PM

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

Pisces





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users