win32: clear sound buffer when not using default frame time (fixes #310)

This commit is contained in:
OV2 2018-05-28 12:04:35 +02:00
parent ca9ec5ff19
commit 1cd8d65705
1 changed files with 2 additions and 2 deletions

View File

@ -3620,9 +3620,9 @@ int WINAPI WinMain(
ProcessInput();
// no sound sync when speed is not set to 100%
while(PCFrameTimeIsDefault && !S9xSyncSound()) {
while(!S9xSyncSound()) {
ResetEvent(GUI.SoundSyncEvent);
if(WaitForSingleObject(GUI.SoundSyncEvent,1000) != WAIT_OBJECT_0)
if(!PCFrameTimeIsDefault || WaitForSingleObject(GUI.SoundSyncEvent,1000) != WAIT_OBJECT_0)
S9xClearSamples();
}