OpenAL, aiff / wav loading

Member
Posts: 320
Joined: 2003.06
Post: #1
I'm moving away from my reliance on fmod, and so am converting a bunch of stuff to use OpenAL.

I have it streaming OGG files happily thanks mostly to One Sad Cookie but also this Gamedev.net tutorial.

What I can't seem to figure out is how to load a WAV or AIF file into openAL.

alut has a few methods that seem like they might be useful, in particular alutLoadMemoryFromFileImage but these do not appear to be available under OSX.

Does anyone know how to load either (or both) of these formats into a buffer for OpenAL? Alternatively has anyone seen any documentation that might lead me in the right direction? Any documentation I've found has been sparse at best, and Google isn't helping me much.

Chopper, iSight Screensavers, DuckDuckDuck: http://majicjungle.com
Quote this message in a reply
Member
Posts: 320
Joined: 2003.06
Post: #2
alutLoadWAVFile works for WAV as long as you declare the method somewhere. I'd still be very interested to hear from anyone who has used AIF files with OpenAL. I'd rather not convert all my sounds to WAV.

Chopper, iSight Screensavers, DuckDuckDuck: http://majicjungle.com
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #3
CoreAudio's AudioToolbox framework has a mostly-usable audio file loading API which'd allow you to create an OpenAL buffer from any supported audio format (including various compressed formats) easily enough.

If you care about cross-platform, "libaudiofile" is very easy to use, and although its format support is limited, it does support WAV and AIF.
Quote this message in a reply
Moderator
Posts: 1,560
Joined: 2003.10
Post: #4
AIFF is actually pretty easy to parse manually, if you don't mind doing a little bit of dirty work. Here's a format reference: http://www.borg.com/~jglatt/tech/aiff.htm
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  OpenAL - loading and playing mp3 Ratty 6 8,437 Jun 12, 2008 12:01 AM
Last Post: OneSadCookie