From 3e4840df0c874753672288ffbc9046e134cf2ddf Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Thu, 10 Jan 2013 23:41:26 +0100 Subject: [PATCH] Don't lock the audio mutex if sound is off --- Core/HLE/__sceAudio.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Core/HLE/__sceAudio.cpp b/Core/HLE/__sceAudio.cpp index 48261e457b..89338fb447 100644 --- a/Core/HLE/__sceAudio.cpp +++ b/Core/HLE/__sceAudio.cpp @@ -198,9 +198,8 @@ void __AudioUpdate() } } - section.lock(); - if (g_Config.bEnableSound) { + section.lock(); if (outAudioQueue.room() >= hwBlockSize * 2) { // Push the mixed samples onto the output audio queue. for (int i = 0; i < hwBlockSize; i++) { @@ -210,14 +209,14 @@ void __AudioUpdate() outAudioQueue.push((s16)sampleL); outAudioQueue.push((s16)sampleR); } - } else { - // This happens quite a lot. There's still something slightly off - // about the amount of audio we produce. - DEBUG_LOG(HLE, "Audio outbuffer overrun! room = %i / %i", outAudioQueue.room(), (u32)outAudioQueue.capacity()); } + section.unlock(); + } else { + // This happens quite a lot. There's still something slightly off + // about the amount of audio we produce. + DEBUG_LOG(HLE, "Audio outbuffer overrun! room = %i / %i", outAudioQueue.room(), (u32)outAudioQueue.capacity()); } - section.unlock(); } void __AudioSetOutputFrequency(int freq)