Re: Broken ALSA surround sound with OpenALSoft 1.12 and newer

Chris Robinson <[email protected]> Fri, 24 Feb 2012 16:40:52 -0800
Newsgroups gmane.comp.lib.openal
Message-ID <1400576.mjUX9U6Ta7@kittycat>
On Friday, February 24, 2012 2:44:10 PM Martin Egge wrote:
> Hi,
> 
> I've discovered a problem with OpenALSoft 1.12 and newer on my Ubuntu Linux
> 11.04 Natty. If I configure OpenAL to use the ALSA device surround51 [1] and
> run my sample application [2] I get the following error:
> 
> Using device: ALSA Software
> AL lib: alsa.c:743: set buffer time near failed: Invalid argument
> Error: Could not create the audio context!
> Error: Audio format not supported (more the 2 channels)
> AL lib: ALc.c:1879: exit(): closing 1 Device

I really wish I knew why the snd_pcm_hw_params_set_*_near functions can fail 
from an unsupported value. Both the function name and the documentation 
suggest it'll select the value nearest to the request, meaning the only reason 
it could fail is if there's no supported value (otherwise there has to be a 
value nearest to the target, regardless of how different it actually is). But 
I know that's not the case.

> Everything is fine with OpenALSoft 1.11 and older.
> 
> 
> Has anyone an idea, what to do?

You can try modifying the 'periods' setting in alsoft.conf. The default is 4, 
but you can try setting it to 2 or 3 to reduce the buffer size.

Out of curiousity, what audio hardware do you have? ALSA's surround51 device 
will use hardware access, meaning nothing else will be able to access the 
device unless it supports hardware mixing. If it doesn't support hardware 
mixing, it may be worthwhile to define a dmix device for 5.1 output (I can 
provide examples for this if you need).
_______________________________________________
Openal mailing list
[email protected]
http://opensource.creative.com/mailman/listinfo/openal