temp fix for deadlocks in SoundSDL on pause #139

SDL_PauseAudioDevice seems to be causing thread deadlocks in combination
with Wx threads (e.g. on menu activation or modal dialogs.)

Remove these calls from SoundSDL::pause() and SoundSDL::resume() for the
time being so that deadlocks do not happen.

This effectively allows pausing, but on resume there is no sound for 2-3
seconds until the buffer is filled again.

This will need a proper fix at a later time.
This commit is contained in:
Rafael Kitover 2017-08-15 15:30:27 -07:00
parent 2da2d9c41d
commit 03a20820cb
1 changed files with 2 additions and 2 deletions

View File

@ -175,7 +175,7 @@ void SoundSDL::pause()
if (!_initialized)
return;
SDL_PauseAudioDevice(_dev, 1);
//SDL_PauseAudioDevice(_dev, 1); // this causes thread deadlocks
}
void SoundSDL::resume()
@ -183,7 +183,7 @@ void SoundSDL::resume()
if (!_initialized)
return;
SDL_PauseAudioDevice(_dev, 0);
//SDL_PauseAudioDevice(_dev, 0); // this causes thread deadlocks
}
void SoundSDL::reset()