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

@ -17,12 +17,14 @@
#include "Common.h"
#include "Thread.h"
#include "../../../PluginSpecs/pluginspecs_dsp.h"
#include "AlsaSoundStream.h"
#define BUFFER_SIZE 4096
#define BUFFER_SIZE_BYTES (BUFFER_SIZE*2*2)
extern DSPInitialize g_dspInitialize;
AlsaSound::AlsaSound(CMixer *mixer) : SoundStream(mixer), thread_data(0), handle(NULL)
{
mix_buffer = new u8[BUFFER_SIZE_BYTES];
@ -53,6 +55,18 @@ void AlsaSound::Stop()
thread = NULL;
}
void AlsaSound::Clear()
{
if(!*g_dspInitialize.pEmulatorState)
{
g_muted = false;
}
else
{
g_muted = true;
}
}
void AlsaSound::Update()
{
// don't need to do anything here.
@ -180,13 +194,6 @@ bool AlsaSound::AlsaInit()
NOTICE_LOG(AUDIO, "ALSA successfully initialized.\n");
return true;
}
void AlsaSound::Mute(bool bMute) {
if((bMute && g_muted) || (!bMute && !g_muted))
return;
g_muted = bMute;
}
void AlsaSound::AlsaShutdown()
{