From afef9fb5f03e202d398e22054561a6e3385f9e17 Mon Sep 17 00:00:00 2001 From: ayuanx Date: Sun, 13 Dec 2009 11:51:29 +0000 Subject: Code cleanup, removed extern declaration in sound streams git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4688 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/AudioCommon/Src/AlsaSoundStream.cpp | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) (limited to 'Source/Core/AudioCommon/Src/AlsaSoundStream.cpp') diff --git a/Source/Core/AudioCommon/Src/AlsaSoundStream.cpp b/Source/Core/AudioCommon/Src/AlsaSoundStream.cpp index 3f74c4993c..60224ba3db 100644 --- a/Source/Core/AudioCommon/Src/AlsaSoundStream.cpp +++ b/Source/Core/AudioCommon/Src/AlsaSoundStream.cpp @@ -17,14 +17,11 @@ #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]; @@ -55,18 +52,6 @@ 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. @@ -76,12 +61,12 @@ void AlsaSound::Update() void AlsaSound::SoundLoop() { AlsaInit(); + // nakee: What is the optimal value? + int frames_to_deliver = BUFFER_SIZE; while (!thread_data) { - // nakee: What is the optimal value? - int frames_to_deliver = 4096; m_mixer->Mix(reinterpret_cast(mix_buffer), frames_to_deliver); - int rc = g_muted ? 1337 : snd_pcm_writei(handle, mix_buffer, frames_to_deliver); + int rc = m_muted ? 1337 : snd_pcm_writei(handle, mix_buffer, frames_to_deliver); if (rc == -EPIPE) { // Underrun -- cgit v1.2.3