aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/winmm.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-05-03 02:29:26 -0700
committerChris Robinson <[email protected]>2011-05-03 02:29:26 -0700
commitba236ad1084ffc99890f0301f444ddc7d63a64e1 (patch)
tree57c2cb594091d19ff86485d2a9039e69ad595778 /Alc/winmm.c
parent9a28402b90c596ccdc7d1a4ee93f5711637bb484 (diff)
Add a frequency-request device flag
Diffstat (limited to 'Alc/winmm.c')
-rw-r--r--Alc/winmm.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/Alc/winmm.c b/Alc/winmm.c
index 10d0c28f..348e764f 100644
--- a/Alc/winmm.c
+++ b/Alc/winmm.c
@@ -428,7 +428,13 @@ static ALCboolean WinMMResetPlayback(ALCdevice *device)
device->UpdateSize = (ALuint)((ALuint64)device->UpdateSize *
pData->Frequency / device->Frequency);
- device->Frequency = pData->Frequency;
+ if(device->Frequency != streamInfo->sampleRate)
+ {
+ if((device->Flags&DEVICE_FREQUENCY_REQUEST))
+ AL_PRINT("WinMM does not support changing sample rates (wanted %dhz, got %dhz)\n", device->Frequency, pData->Frequency);
+ device->Flags &= ~DEVICE_FREQUENCY_REQUEST;
+ device->Frequency = pData->Frequency;
+ }
pData->lWaveBuffersCommitted = 0;