Re: Playing 5.1 sound on a stereo device with OpenAL Soft

Martin Lambers <[email protected]>
Newsgroups gmane.comp.lib.openal
Message-ID <[email protected]>
On 05/11/10 07:21, Chris Robinson wrote:
> On Thursday, November 04, 2010 9:59:15 pm Martin Lambers wrote:
>> How do I play multichannel sound on a stereo device using OpenAL (Soft)?
>>
>> >From the example alffmpeg.c, I had the impression that OpenAL would
>> automatically perform downmixing of a 5.1 file if the output device was
>> stereo, but that does not seem to be the case. For example, with this
>> test file
>> <http://www.lynnepublishing.com/surround/www_lynnemusic_com_surround_test.a
>> c3>, alffmpeg only plays static noise on my system. Other ffmpeg-based
>> players can play it fine, so I don't think it's a decoding problem.
> 

> What version of OpenAL Soft are you using? The downmixing is automatic, and it 
> seems to work fine for me. If possible, try recompiling alffmpeg... ffmpeg 
> updates sometimes break compatibility in odd ways.

You're right, it is indeed an ffmpeg problem. Some audio streams are
apparently *not* decoded to signed 16 bit sample formats. The ffplay
player contains code to convert sample formats in this case, but uses an
internal ffmpeg API for this purpose that is not part of the installed
header files. So, no luck for alffmpeg and my project...

Test case:
http://www.lynnepublishing.com/surround/www_lynnemusic_com_surround_test.wma
(WMA version of the above file; the AC3 version decodes to s16 samples
and plays fine).

I'll report this to the ffmpeg bug tracker.

Martin
_______________________________________________
Openal mailing list
[email protected]
http://opensource.creative.com/mailman/listinfo/openal
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.