[Openal-devel] Global Sample Rate
garinh at cheesetoast.net
Thu Oct 5 08:14:56 PDT 2006
> Is there a global sample rate defined in OpenAL? I'm looking at the
> Windows source code and can't see one defined anywhere.
No, there isn't a guaranteed way to set the global mixing sample rate.
The Windows code, for instance, uses a fixed mixer sample rate of
44.1kHz for the "Generic Software" mixer, and for "Generic Hardware"
just hands the issue over to DS3D (where the value is determined by the
You can provide an ALC_FREQUENCY value when creating a context, which is
used as a hint. Some mixers may change their value to whatever is
passed in with that attribute. You can also retrieve the ALC_FREQUENCY
attribute after context creation to see what sample rate the mixer is
at. Note -- with "Generic Hardware", the ALC_FREQUENCY will be reported
as 44.1kHz, but that may not be the actual value -- we don't really know
what DS3D is going to be using for an arbitrary driver, but the value
will be at 44.1kHz or above, so we just inserted the most conservative
value as a return value.
More information about the Openal-devel