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,7 +19,6 @@
#include <cmath>
#include <dxerr.h>
#include "DSoundStream.h"
#include "../../../PluginSpecs/pluginspecs_dsp.h"
extern DSPInitialize g_dspInitialize;
@ -172,9 +171,14 @@ void DSound::Update()
void DSound::Clear()
{
memset(realtimeBuffer, 0, sizeof(realtimeBuffer));
Update();
if(!*g_dspInitialize.pEmulatorState)
{
dsBuffer->Play(0, 0, DSBPLAY_LOOPING);
}
else
{
dsBuffer->Stop();
}
}
void DSound::Stop()
@ -193,15 +197,3 @@ void DSound::Stop()
thread = NULL;
}
void DSound::Mute(bool bMute) {
if((bMute && g_muted) || (!bMute && !g_muted))
return;
if(bMute)
dsBuffer->Stop();
else
dsBuffer->Play(0, 0, DSBPLAY_LOOPING);
g_muted = bMute;
}