aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-12-28 12:47:59 -0800
committerChris Robinson <[email protected]>2009-12-28 12:47:59 -0800
commit179b660eee8cfc958057cb237019a939c3361fbb (patch)
tree9e8cb23e81fedc142b0e37ba3919c657d77cf00b /Alc
parenta0ef7be9a56b52785da19a80cf45cd6a2216046a (diff)
Enforce a lower bound playback frequency of 8khz
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 7cdf2049..8db45cff 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -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);