[openal] configuration enhancement suggestion

Chris Robinson chris.kcat at gmail.com
Wed Jan 28 08:30:52 EST 2015

On 01/28/2015 03:59 AM, Matěj Týč wrote:
> I have set everything up in the PulseAudio (PA) daemon config file and
> it mostly worked - I had just problems with some games.
> Then, I have learned that putting frequency = 96000 in /etc/alsoft.conf
> might fix the issue. Although I had to create that file as it wasn't
> present, it indeed fixed the problem!
> So I am happy now, but at the same time I think that writing values to a
> config file is unnecessary since somehow querying PA what the sampling
> rate of the current sound card is should do the trick.
> I think that adding this auto-configuration feature would improve the
> user experience for Linux DAC owners dramatically.

OpenAL Soft should automatically detect and use the sample rate from 
PulseAudio. As long as nothing is specifically requesting a sample rate, 
it sets the PA_STREAM_FIX_RATE flag which should cause PulseAudio to 
effectively ignore the requested sample rate for the stream and use 
whatever the device is set to.

Presuming nothing else is trying to set a specific sample rate, the only 
difference in behavior with specifying it in the config file should be 
that OpenAL Soft won't try to rescale the buffer metrics based on the 
changed rate. That is, it will continue to use the default 1024 sample 
period with 4 periods, instead of increasing it to a 1024 sample period 
with 8 periods to compensate for the samples being consumed twice as 
fast as originally expected.

What exactly was the problem that the config setting fixed?

More information about the openal mailing list