[Openal] Use of ALC_FREQUENCY property

Chris Robinson chris.kcat at gmail.com
Tue May 19 23:18:53 PDT 2009


On Tuesday 19 May 2009 1:20:05 pm Jim B. wrote:
> The existing program allows menu selection of sound quality by setting the
> maximum sampling rate. As near as I can tell, this is not useful in OpenAL.
> Is it true that the ALC_FREQUENCY property is not settable in current
> OpenAL implementations?

It's not settable in OpenAL Soft, currently. I'm not sure if it has an effect 
on the Windows implementation or not, though.. it may work there. I do have 
plans for implementing it in OpenAL Soft, when I find a safe way to do it.

> Also, in the current versions, is it possible for
> ALC_FREQUENCY to be anything other than 44100 KHz?

Yes. OpenAL Soft allows the user to set a default frequency for playback via a 
couple config files (eg. I use 48khz output), and it may also be modified 
according to the hardware's needs. Calling alcGetIntegerv with ALC_FREQUENCY 
should show these changes.

> It looks like OpenAL
> will resample any file that is not at ALC_FREQUENCY when the Buffer is
> loaded. So, there is no point in resampling before loading the Buffer --
> correct? Also. I am trying to decide if it would be worthwhile to check for
> ALC_FREQUENCY at 22050 KHz (or less) and low pass filter our 44100 KHz
> sound files.

There's no need to filter sounds before loading. Just load the sound with its 
original sample rate, and OpenAL will take care of resampling and everything 
for you.


More information about the Openal mailing list