mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 06:39:46 -06:00
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:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user