diff options
Diffstat (limited to 'Alc/backends/winmm.c')
-rw-r--r-- | Alc/backends/winmm.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/Alc/backends/winmm.c b/Alc/backends/winmm.c index 9f2c6316..57d27974 100644 --- a/Alc/backends/winmm.c +++ b/Alc/backends/winmm.c @@ -397,6 +397,21 @@ static void WinMMClosePlayback(ALCdevice *device) static ALCboolean WinMMResetPlayback(ALCdevice *device) { WinMMData *pData = (WinMMData*)device->ExtraData; + + device->UpdateSize = (ALuint)((ALuint64)device->UpdateSize * + pData->Frequency / device->Frequency); + device->UpdateSize = device->UpdateSize*device->NumUpdates / 4; + device->NumUpdates = 4; + device->Frequency = pData->Frequency; + + SetDefaultWFXChannelOrder(device); + + return ALC_TRUE; +} + +static ALCboolean WinMMStartPlayback(ALCdevice *device) +{ + WinMMData *pData = (WinMMData*)device->ExtraData; ALbyte *BufferData; ALint lBufferSize; ALuint i; @@ -405,12 +420,6 @@ static ALCboolean WinMMResetPlayback(ALCdevice *device) if(pData->hWaveThread == NULL) return ALC_FALSE; - device->UpdateSize = (ALuint)((ALuint64)device->UpdateSize * - pData->Frequency / device->Frequency); - device->Frequency = pData->Frequency; - - SetDefaultWFXChannelOrder(device); - pData->lWaveBuffersCommitted = 0; // Create 4 Buffers @@ -689,6 +698,7 @@ static const BackendFuncs WinMMFuncs = { WinMMOpenPlayback, WinMMClosePlayback, WinMMResetPlayback, + WinMMStartPlayback, WinMMStopPlayback, WinMMOpenCapture, WinMMCloseCapture, |