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/AlsaSoundStream.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/AlsaSoundStream.cpp')
| -rw-r--r-- | Source/Core/AudioCommon/Src/AlsaSoundStream.cpp | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/Source/Core/AudioCommon/Src/AlsaSoundStream.cpp b/Source/Core/AudioCommon/Src/AlsaSoundStream.cpp index dfc23300b0..3f74c4993c 100644 --- a/Source/Core/AudioCommon/Src/AlsaSoundStream.cpp +++ b/Source/Core/AudioCommon/Src/AlsaSoundStream.cpp @@ -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() { |
