Hy, this is my first commit, and i hope it is not bad xD.

- First change is for Mixer.cpp, I've just re-added the functionality lost in r4724, so, if you disable audio throttle, games like donkey kong jungle beat, will work properly.

- Second change points to a doubt comment on UCode_Zelda_Voice.cpp, where it did not know here PB.NeedsReset came from. Well, the answer is it came from line 03b2 of the dumped Ucode, so when PB.IsBlanck equals to zero, PB.NeedsReset is zero too.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6100 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Ignacio Farias 2010-08-16 15:22:53 +00:00
parent fec9234aca
commit fd5f7ba6b4
2 changed files with 13 additions and 5 deletions

View File

@ -136,9 +136,16 @@ unsigned int CMixer::Mix(short* samples, unsigned int numSamples)
void CMixer::PushSamples(short *samples, unsigned int num_samples)
{
// The auto throttle function. This loop will put a ceiling on the CPU MHz.
if (m_throttle)
// Audio Throttle is off. On Ayuanx commit 4717, it is used to write Other Audio.
// I've just bring that back, and games like Donkey Kong Jungle Beat (WII) now will
// work properly without using Audio Throttle.
if (!m_throttle)
{
return;
{
else
{
// The auto throttle function. This loop will put a ceiling on the CPU MHz.
while (Common::AtomicLoad(m_numSamples) >= MAX_SAMPLES - RESERVED_SAMPLES)
{
if (g_dspInitialize.pEmulatorState)

View File

@ -579,9 +579,6 @@ void CUCode_Zelda::RenderAddVoice(ZeldaVoicePB &PB, s32* _LeftBuffer, s32* _Righ
break;
}
}
// Necessary for SMG, not for Zelda. Weird. Where's it from?
PB.NeedsReset = 0;
ContinueWithBlock:
@ -733,6 +730,10 @@ ContinueWithBlock:
addr++;
}
}
// 03b2, this is the reason of using PB.NeedsReset. Seems to be necessary for SMG, and maybe other games.
if (PB.IsBlank == 0){
PB.NeedsReset = 0;
}
}
// size is in stereo samples.