mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Fixed annoying sound when pausing/shutting down (please test for ALL backends) (couldn't do this for CoreAudio and PulseAudio too)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4676 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -51,7 +51,8 @@ void AOSound::SoundLoop()
|
||||
{
|
||||
soundCriticalSection.Enter();
|
||||
m_mixer->Mix(realtimeBuffer, numBytesToRender >> 2);
|
||||
ao_play(device, (char*)realtimeBuffer, numBytesToRender);
|
||||
if(!g_muted)
|
||||
ao_play(device, (char*)realtimeBuffer, numBytesToRender);
|
||||
soundCriticalSection.Leave();
|
||||
|
||||
if (! threadData)
|
||||
@ -105,4 +106,12 @@ AOSound::~AOSound() {
|
||||
// FIXME: crashes dolphin
|
||||
// ao_shutdown();
|
||||
}
|
||||
|
||||
void AOSound::Mute(bool bMute) {
|
||||
if((bMute && g_muted) || (!bMute && !g_muted))
|
||||
return;
|
||||
|
||||
g_muted = bMute;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user