Multi channel (5.1 or higher) in Open AL

View: New views
3 Messages — Rating Filter:   Alert me  

Multi channel (5.1 or higher) in Open AL

by Richard Rosario :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Greetings to you,
         How do you play multi channel audio in Open AL. Does open AL allow only up to two channels?
Is there any possibility to play 5.1 or higher channel audio files.

Thanks and Regards
Richard



_______________________________________________
Openal-devel mailing list
Openal-devel@...
http://opensource.creative.com/mailman/listinfo/openal-devel

Re: Multi channel (5.1 or higher) in Open AL

by Jason Daly :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Richard Rosario wrote:
>
> Is there any possibility to play 5.1 or higher channel audio files.

Yes (depending on your OS and implementation).  To check if your
implementation supports it, check for support of the AL_EXT_MCFORMATS
extension.  The Creative native implementation supports it, and I think
newer versions of OpenAL-Soft also support it.

If your implementation supports it, you can just load it and play it as
any other sound.  If the sound is multi-channel, it will be played
normally (not spatialized).

--"J"

_______________________________________________
Openal-devel mailing list
Openal-devel@...
http://opensource.creative.com/mailman/listinfo/openal-devel

Re: Multi channel (5.1 or higher) in Open AL

by Chris Robinson-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Monday 02 February 2009 4:53:12 am Richard Rosario wrote:
> Greetings to you,
>          How do you play multi channel audio in Open AL. Does open AL allow
> only up to two channels?
> Is there any possibility to play 5.1 or higher channel audio files.

Hi Richard.

You can use the AL_EXT_MCFORMATS extension to play 5.1 (as well as quad, 6.1,
and 7.1) audio files. It provides the formats:
AL_FORMAT_QUAD16  // 4 channel, 16-bit
AL_FORMAT_51CHN16 // 5.1 channel, 16-bit
AL_FORMAT_61CHN16 // 6.1 channel, 16-bit
AL_FORMAT_71CHN16 // 7.1 channel, 16-bit

where it expects typical signed 16-bit data. There's also *8 variants where it
expects unsigned 8-bit data, and *32 where, AFAIK, it expects 32-bit float
(someone correct me if I'm wrong). The channels are ordered according to how
they would be in a wave file:
quad: front-left, front-right, back-left, back-right
5.1: front-left, front-right, center, lfe, back-left, back-right
6.1: front-left, front-right, center, lfe, back-center, side-left, side-right
7.1: front-left, front-right, center, lfe, back-left, back-right, side-left,
side-right

(this being what I could deduce from the SDK's examples; again, someone please
correct me if I'm wrong).

OpenAL Soft supports this extension, but it doesn't look like the Creative's
"Generic Software" driver does. I'm not sure about OSX. Note that the current
release of OpenAL Soft has a bug that causes the channels to be dropped if the
output mode doesn't have a matching channel.. though this is fixed in the
current GIT version (if there's no matching output channel, it'll be remixed
into channels that do exist). The current release also incorrectly handles
6.1, which should be fixed in GIT as well.

Hope that helps,
- Chris
_______________________________________________
Openal-devel mailing list
Openal-devel@...
http://opensource.creative.com/mailman/listinfo/openal-devel