Improved XTra.KrazzY's Mute-On-Pause a bit, so it won't cost any CPU time when it is not used.

Revert old Zelda-TP hack, though it really shouldn't be there...



git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4684 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
ayuanx
2009-12-12 22:30:53 +00:00
parent 7be17e6531
commit fad1fa4e3d
12 changed files with 48 additions and 64 deletions

View File

@ -19,9 +19,12 @@
#include "AOSoundStream.h"
#include "Mixer.h"
#include "../../../PluginSpecs/pluginspecs_dsp.h"
#if defined(HAVE_AO) && HAVE_AO
extern DSPInitialize g_dspInitialize;
void AOSound::SoundLoop()
{
uint_32 numBytesToRender = 256;
@ -85,8 +88,14 @@ void AOSound::Update()
void AOSound::Clear()
{
memset(realtimeBuffer, 0, sizeof(realtimeBuffer));
if(!*g_dspInitialize.pEmulatorState)
{
g_muted = false;
}
else
{
g_muted = true;
}
Update();
}
@ -107,11 +116,4 @@ AOSound::~AOSound() {
// ao_shutdown();
}
void AOSound::Mute(bool bMute) {
if((bMute && g_muted) || (!bMute && !g_muted))
return;
g_muted = bMute;
}
#endif