summaryrefslogtreecommitdiff
path: root/Source/Core/AudioCommon/Src/AlsaSoundStream.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/AudioCommon/Src/AlsaSoundStream.cpp')
-rw-r--r--Source/Core/AudioCommon/Src/AlsaSoundStream.cpp21
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