diff options
author | Chris Robinson <[email protected]> | 2009-12-28 12:47:59 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2009-12-28 12:47:59 -0800 |
commit | 179b660eee8cfc958057cb237019a939c3361fbb (patch) | |
tree | 9e8cb23e81fedc142b0e37ba3919c657d77cf00b /Alc | |
parent | a0ef7be9a56b52785da19a80cf45cd6a2216046a (diff) |
Enforce a lower bound playback frequency of 8khz
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/ALc.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1216,8 +1216,8 @@ ALCAPI ALCcontext* ALCAPIENTRY alcCreateContext(ALCdevice *device, const ALCint if(attrList[attrIdx] == ALC_FREQUENCY) { freq = attrList[attrIdx + 1]; - if(freq == 0) - freq = device->Frequency; + if(freq < 8000) + freq = 8000; } if(attrList[attrIdx] == ALC_STEREO_SOURCES) @@ -1684,8 +1684,8 @@ ALCAPI ALCdevice* ALCAPIENTRY alcOpenDevice(const ALCchar *deviceName) //Set output format device->Frequency = GetConfigValueInt(NULL, "frequency", SWMIXER_OUTPUT_RATE); - if(device->Frequency == 0) - device->Frequency = SWMIXER_OUTPUT_RATE; + if(device->Frequency < 8000) + device->Frequency = 8000; fmt = GetConfigValue(NULL, "format", "AL_FORMAT_STEREO16"); device->Format = GetFormatFromString(fmt); |