mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2025-12-12 09:48:51 +01:00
deinitialize audio correctly when deinitializing SDL: add a while(Mix_Init(0)) before Mix_Quit()
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
This commit is contained in:
parent
af54231219
commit
e9070675b9
@ -234,11 +234,11 @@ bool SDL::initialize( Configuration &config )
|
||||
}
|
||||
}
|
||||
|
||||
/*if ( retVal && Mix_OpenAudio( audioRate, audioFormat, audioChannels, audioBuffers ) == -1 )
|
||||
if ( retVal && Mix_OpenAudio( audioRate, audioFormat, audioChannels, audioBuffers ) == -1 )
|
||||
{
|
||||
std::string error = Mix_GetError( );
|
||||
Logger::write( Logger::ZONE_WARNING, "SDL", "Audio initialize failed: " + error );
|
||||
}*/
|
||||
}
|
||||
|
||||
return retVal;
|
||||
|
||||
@ -251,8 +251,10 @@ bool SDL::deInitialize( )
|
||||
std::string error = SDL_GetError( );
|
||||
Logger::write( Logger::ZONE_INFO, "SDL", "DeInitializing" );
|
||||
|
||||
/*Mix_CloseAudio( );
|
||||
Mix_Quit( );*/
|
||||
Mix_CloseAudio( );
|
||||
|
||||
while(Mix_Init(0))
|
||||
Mix_Quit();
|
||||
|
||||
if ( mutex_ )
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user