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/alsa.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Alc/alsa.c') diff --git a/Alc/alsa.c b/Alc/alsa.c index a7e87587..500ab13b 100644 --- a/Alc/alsa.c +++ b/Alc/alsa.c @@ -664,7 +664,13 @@ static ALCboolean alsa_reset_playback(ALCdevice *device) psnd_pcm_sw_params_free(sp); - device->Frequency = rate; + if(device->Frequency != rate) + { + if((device->Flags&DEVICE_FREQUENCY_REQUEST)) + AL_PRINT("Failed to set requested frequency %dhz, got %dhz instead\n", device->Frequency, rate); + device->Flags &= ~DEVICE_FREQUENCY_REQUEST; + device->Frequency = rate; + } SetDefaultChannelOrder(device); -- cgit v1.2.3