mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
This should fix the No Sound Problem in GC & Non-AX games.
Besides, this should also fix the WAD game loading issue. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4617 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -184,7 +184,7 @@ void CUCode_AXWii::MixAdd_(short* _pBuffer, int _iSize, ParamBlockType &PB)
|
||||
if (!ReadOutPBWii(blockAddr, PB))
|
||||
break;
|
||||
ProcessUpdates(PB);
|
||||
MixAddVoice(PB, templbuffer, temprbuffer, _iSize, true);
|
||||
MixAddVoice(PB, templbuffer, temprbuffer, _iSize, true, _CRC);
|
||||
if (!WriteBackPBWii(blockAddr, PB))
|
||||
break;
|
||||
|
||||
|
@ -82,7 +82,7 @@ inline bool WriteBackPBWii(u32 pb_address, ParamBlockType& PB)
|
||||
}
|
||||
|
||||
template<class ParamBlockType>
|
||||
inline void MixAddVoice(ParamBlockType &pb, int *templbuffer, int *temprbuffer, int _iSize, bool Wii)
|
||||
inline void MixAddVoice(ParamBlockType &pb, int *templbuffer, int *temprbuffer, int _iSize, bool Wii, u32 CRC = 0)
|
||||
{
|
||||
ratioFactor = 32000.0f / (float)soundStream->GetMixer()->GetSampleRate();
|
||||
|
||||
@ -249,12 +249,18 @@ inline void MixAddVoice(ParamBlockType &pb, int *templbuffer, int *temprbuffer,
|
||||
// New Super Mario Bros.Wii, Fatal Frame 4,
|
||||
// Resident Evil Darkside Chronicles, Muramasa The Demon Blade, etc.
|
||||
samplePos = newSamplePos - sampleEnd + loopPos;
|
||||
|
||||
// AyuanX: DSP should not touch this running state
|
||||
// even when a non-looping voice reaches the end of current sample
|
||||
// because some game checks this flag and will turn it off when necessary
|
||||
//
|
||||
//pb.running = 0;
|
||||
|
||||
if (Wii && (CRC == 0xfa450138))
|
||||
{
|
||||
// Some Wii games check this flag and will turn it off when necessary
|
||||
// If that is the case, DSP should not touch it
|
||||
//
|
||||
//pb.running = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
pb.running = 0;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user