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