aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Alc/dsound.c3
-rw-r--r--Alc/mmdevapi.c2
2 files changed, 2 insertions, 3 deletions
diff --git a/Alc/dsound.c b/Alc/dsound.c
index 8d2834c2..b1312373 100644
--- a/Alc/dsound.c
+++ b/Alc/dsound.c
@@ -513,6 +513,7 @@ static ALCboolean DSoundResetPlayback(ALCdevice *device)
if(SUCCEEDED(hr))
{
+ ResetEvent(pData->hNotifyEvent);
SetDefaultWFXChannelOrder(device);
pData->thread = StartThread(DSoundProc, device);
if(pData->thread == NULL)
@@ -556,8 +557,6 @@ static void DSoundStopPlayback(ALCdevice *device)
if(pData->DSpbuffer != NULL)
IDirectSoundBuffer_Release(pData->DSpbuffer);
pData->DSpbuffer = NULL;
-
- ResetEvent(pData->hNotifyEvent);
}
diff --git a/Alc/mmdevapi.c b/Alc/mmdevapi.c
index d4840de6..b0c0b289 100644
--- a/Alc/mmdevapi.c
+++ b/Alc/mmdevapi.c
@@ -530,6 +530,7 @@ static ALCboolean MMDevApiResetPlayback(ALCdevice *device)
ERR("Audio client returned buffer_len < period*2; expect break up\n");
}
+ ResetEvent(data->hNotifyEvent);
hr = IAudioClient_SetEventHandle(data->client, data->hNotifyEvent);
if(SUCCEEDED(hr))
hr = IAudioClient_Start(data->client);
@@ -564,7 +565,6 @@ static void MMDevApiStopPlayback(ALCdevice *device)
data->killNow = 0;
IAudioClient_Stop(data->client);
- ResetEvent(data->hNotifyEvent);
}