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

@ -17,15 +17,12 @@
#include "aldlist.h"
#include "OpenALStream.h"
#include "../../../PluginSpecs/pluginspecs_dsp.h"
#if defined HAVE_OPENAL && HAVE_OPENAL
#define AUDIO_NUMBUFFERS (4)
//#define AUDIO_SERVICE_UPDATE_PERIOD (20)
extern DSPInitialize g_dspInitialize;
bool OpenALStream::Start()
{
ALDeviceList *pDeviceList = NULL;
@ -97,15 +94,16 @@ void OpenALStream::Update()
}
}
void OpenALStream::Clear()
void OpenALStream::Clear(bool mute)
{
if(!*g_dspInitialize.pEmulatorState)
m_muted = mute;
if(m_muted)
{
alSourcePlay(g_uiSource);
alSourceStop(g_uiSource);
}
else
{
alSourceStop(g_uiSource);
alSourcePlay(g_uiSource);
}
}