From ba236ad1084ffc99890f0301f444ddc7d63a64e1 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 3 May 2011 02:29:26 -0700 Subject: Add a frequency-request device flag --- Alc/oss.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Alc/oss.c') diff --git a/Alc/oss.c b/Alc/oss.c index ea18689d..0f91bc04 100644 --- a/Alc/oss.c +++ b/Alc/oss.c @@ -262,7 +262,13 @@ static ALCboolean oss_reset_playback(ALCdevice *device) return ALC_FALSE; } - device->Frequency = ossSpeed; + if(device->Frequency != (ALuint)ossSpeed) + { + if((device->Flags&DEVICE_FREQUENCY_REQUEST)) + AL_PRINT("Failed to set requested frequency %dhz, got %dhz instead\n", device->Frequency, ossSpeed); + device->Flags &= ~DEVICE_FREQUENCY_REQUEST; + device->Frequency = ossSpeed; + } device->UpdateSize = info.fragsize / frameSize; device->NumUpdates = info.fragments + 1; -- cgit v1.2.3