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:
parent
2da2d9c41d
commit
03a20820cb
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue