Disable MVE mixer when movie ends
The global variables that control it configure the callback to do nothing, but SDL_mixer would still call it and still acquire the SDL mutex that protects the call. Such calls are a waste, so disable them. This should also fix <https://github.com/dxx-rebirth/dxx-rebirth/issues/684>, which appears to be caused by the MVE mixer callback being run during gameplay, and the callback not returning immediately. This is suspected to be because a race condition between MVE_rmEndMovie and the callback caused the global variables not to be placed in a state that causes the callback to return immediately.
This commit is contained in:
parent
8d691aa080
commit
e6bba24737
|
@ -746,6 +746,10 @@ void MVE_rmEndMovie(std::unique_ptr<MVESTREAM>)
|
|||
{
|
||||
SDL_CloseAudio();
|
||||
}
|
||||
#if DXX_USE_SDLMIXER
|
||||
else
|
||||
Mix_SetPostMix(nullptr, nullptr);
|
||||
#endif
|
||||
mve_audio_canplay = 0;
|
||||
}
|
||||
mve_audio_buffers = {};
|
||||
|
|
Loading…
Reference in a new issue