diff options
| author | ayuanx <ayuanx@gmail.com> | 2009-12-12 22:30:53 +0000 |
|---|---|---|
| committer | ayuanx <ayuanx@gmail.com> | 2009-12-12 22:30:53 +0000 |
| commit | fad1fa4e3d86c0530226a22842957b7bedf5c7e3 (patch) | |
| tree | 0c997b14e8cb0f83204d7ead03a6503ce9c4e463 /Source/Core/AudioCommon/Src/AOSoundStream.cpp | |
| parent | 7be17e65314357a21480692313a0c05e0a31a78b (diff) | |
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
Diffstat (limited to 'Source/Core/AudioCommon/Src/AOSoundStream.cpp')
| -rw-r--r-- | Source/Core/AudioCommon/Src/AOSoundStream.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/Source/Core/AudioCommon/Src/AOSoundStream.cpp b/Source/Core/AudioCommon/Src/AOSoundStream.cpp index 85766495be..e09a4cff29 100644 --- a/Source/Core/AudioCommon/Src/AOSoundStream.cpp +++ b/Source/Core/AudioCommon/Src/AOSoundStream.cpp @@ -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 |
