diff options
| author | ayuanx <ayuanx@gmail.com> | 2009-12-13 11:51:29 +0000 |
|---|---|---|
| committer | ayuanx <ayuanx@gmail.com> | 2009-12-13 11:51:29 +0000 |
| commit | afef9fb5f03e202d398e22054561a6e3385f9e17 (patch) | |
| tree | b66ee0cf3de92069262f5420b1d6adbc63a810e0 /Source/Core/AudioCommon/Src/AlsaSoundStream.cpp | |
| parent | 4fe3e467254ba7e6d2c8054682e9fcc195ce2c78 (diff) | |
Code cleanup, removed extern declaration in sound streams
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4688 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/AudioCommon/Src/AlsaSoundStream.cpp')
| -rw-r--r-- | Source/Core/AudioCommon/Src/AlsaSoundStream.cpp | 21 |
1 files changed, 3 insertions, 18 deletions
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<short *>(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 |
