Code cleanup, removed extern declaration in sound streams

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4688 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
ayuanx
2009-12-13 11:51:29 +00:00
parent 4fe3e46725
commit afef9fb5f0
11 changed files with 23 additions and 68 deletions

View File

@ -19,12 +19,9 @@
#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;
@ -54,8 +51,7 @@ void AOSound::SoundLoop()
{
soundCriticalSection.Enter();
m_mixer->Mix(realtimeBuffer, numBytesToRender >> 2);
if(!g_muted)
ao_play(device, (char*)realtimeBuffer, numBytesToRender);
ao_play(device, (char*)realtimeBuffer, numBytesToRender);
soundCriticalSection.Leave();
if (! threadData)
@ -86,19 +82,6 @@ void AOSound::Update()
soundSyncEvent.Set();
}
void AOSound::Clear()
{
if(!*g_dspInitialize.pEmulatorState)
{
g_muted = false;
}
else
{
g_muted = true;
}
Update();
}
void AOSound::Stop()
{
soundCriticalSection.Enter();