sound file formats in OpenAL

Sage
Posts: 1,403
Joined: 2005.07
Post: #1
What formats can OpenAL play, other than wav?
If there arent any other or they dont have good compression how can I load other files and play them with OpenAL?
thanks

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
elerion
Unregistered
 
Post: #2
unknown Wrote:What formats can OpenAL play, other than wav?

Just look at the documentation on http://www.openal.org
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #3
Oh thanks I hadn't found that yet.

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #4
OpenAL doesn't know anything about file formats any more than OpenGL does. It accepts uncompressed audio data in a bunch of formats. It's up to you to load the file, decompress it, and send it to AL, just as is the case with textures in OpenGL.

alutLoadWAVFile is not a part of AL proper, and is gone in OpenAL 1.1.
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #5
Right Im going to have to get ogg vorbis to work then Mad
Ill be doing that tommorow though...
And once its done ill post it on the wiki Wink

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Member
Posts: 144
Joined: 2004.07
Post: #6
this works great for me. In five-ten minutes I had everything setup and working perfectly, the only thing I changed was using SDL for endian checking.
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #7
Yes!!!!!
Endian, OMG, thats why it was loading instantly and giving me random noise!
All is not lost, my soul returns.
thank you lightbringer, time to implement this into my game before sleep...

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Sage
Posts: 1,482
Joined: 2002.09
Post: #8
There is an extension that allows you to play ogg streams without decompressing them. Information here.

You just read the ogg file directly into memory and create a buffer out of it. Very simple.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  File formats qwsed 10 8,746 Dec 18, 2010 10:49 AM
Last Post: AnotherJake
  OpenAL looping sound problem Gillissie 0 3,863 Sep 16, 2010 12:31 AM
Last Post: Gillissie
  OpenAL - sound disappearing Madrayken 3 4,683 Jan 19, 2010 03:22 AM
Last Post: Madrayken
  OpenAL - Varying Pitch (for an engine sound) SethWillits 4 9,338 Aug 17, 2009 06:29 AM
Last Post: FrazAli
  internal formats. What are they good for? WhatMeWorry 2 3,626 Jan 9, 2007 11:58 PM
Last Post: arekkusu