mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -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,14 @@
|
||||
|
||||
#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];
|
||||
@ -53,6 +55,18 @@ 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.
|
||||
@ -180,13 +194,6 @@ bool AlsaSound::AlsaInit()
|
||||
NOTICE_LOG(AUDIO, "ALSA successfully initialized.\n");
|
||||
return true;
|
||||
}
|
||||
|
||||
void AlsaSound::Mute(bool bMute) {
|
||||
if((bMute && g_muted) || (!bMute && !g_muted))
|
||||
return;
|
||||
|
||||
g_muted = bMute;
|
||||
}
|
||||
|
||||
void AlsaSound::AlsaShutdown()
|
||||
{
|
||||
|
Reference in New Issue
Block a user