mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Improved XTra.KrazzY's Mute-On-Pause a bit, so it won't cost any CPU time when it is not used.
Revert old Zelda-TP hack, though it really shouldn't be there... git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4684 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -17,12 +17,15 @@
|
||||
|
||||
#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;
|
||||
@ -96,9 +99,14 @@ void OpenALStream::Update()
|
||||
|
||||
void OpenALStream::Clear()
|
||||
{
|
||||
memset(realtimeBuffer, 0, sizeof(realtimeBuffer));
|
||||
|
||||
Update();
|
||||
if(!*g_dspInitialize.pEmulatorState)
|
||||
{
|
||||
alSourcePlay(g_uiSource);
|
||||
}
|
||||
else
|
||||
{
|
||||
alSourceStop(g_uiSource);
|
||||
}
|
||||
}
|
||||
|
||||
THREAD_RETURN OpenALStream::ThreadFunc(void* args)
|
||||
@ -178,17 +186,5 @@ void OpenALStream::SoundLoop()
|
||||
|
||||
}
|
||||
|
||||
void OpenALStream::Mute(bool bMute) {
|
||||
if((bMute && g_muted) || (!bMute && !g_muted))
|
||||
return;
|
||||
|
||||
if(bMute && g_uiSource)
|
||||
alSourceStop(g_uiSource);
|
||||
else if(g_uiSource)
|
||||
alSourcePlay(g_uiSource);
|
||||
|
||||
g_muted = bMute;
|
||||
}
|
||||
|
||||
#endif //HAVE_OPENAL
|
||||
|
||||
|
Reference in New Issue
Block a user