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

@ -18,10 +18,8 @@
#include <windows.h>
#include <cmath>
#include <dxerr.h>
#include "AudioCommon.h"
#include "DSoundStream.h"
#include "../../../PluginSpecs/pluginspecs_dsp.h"
extern DSPInitialize g_dspInitialize;
bool DSound::CreateBuffer()
{
@ -169,15 +167,16 @@ void DSound::Update()
soundSyncEvent.Set();
}
void DSound::Clear()
void DSound::Clear(bool mute)
{
if(!*g_dspInitialize.pEmulatorState)
m_muted = mute;
if (m_muted)
{
dsBuffer->Play(0, 0, DSBPLAY_LOOPING);
dsBuffer->Stop();
}
else
{
dsBuffer->Stop();
dsBuffer->Play(0, 0, DSBPLAY_LOOPING);
}
}