mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Fixed annoying sound when pausing/shutting down (please test for ALL backends) (couldn't do this for CoreAudio and PulseAudio too)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4676 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -67,7 +67,7 @@ void AlsaSound::SoundLoop()
|
||||
// nakee: What is the optimal value?
|
||||
int frames_to_deliver = 4096;
|
||||
m_mixer->Mix(reinterpret_cast<short *>(mix_buffer), frames_to_deliver);
|
||||
int rc = snd_pcm_writei(handle, mix_buffer, frames_to_deliver);
|
||||
int rc = g_muted ? 1337 : snd_pcm_writei(handle, mix_buffer, frames_to_deliver);
|
||||
if (rc == -EPIPE)
|
||||
{
|
||||
// Underrun
|
||||
@ -180,6 +180,13 @@ 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