mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-21 05:09:46 -06:00
EmuInstanceAudio.cpp: Dont open new mic device on audioEnable(). Fixes memory leak when reseting the emu
This commit is contained in:
@ -495,11 +495,11 @@ void EmuInstance::audioUpdateSettings()
|
||||
void EmuInstance::audioEnable()
|
||||
{
|
||||
if (audioDevice) SDL_PauseAudioDevice(audioDevice, 0);
|
||||
micOpen();
|
||||
if (micDevice) SDL_PauseAudioDevice(micDevice, 0);
|
||||
}
|
||||
|
||||
void EmuInstance::audioDisable()
|
||||
{
|
||||
if (audioDevice) SDL_PauseAudioDevice(audioDevice, 1);
|
||||
micClose();
|
||||
if (micDevice) SDL_PauseAudioDevice(micDevice, 1);
|
||||
}
|
||||
|
Reference in New Issue
Block a user