mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 17:19:44 -06:00
Trying to fix mixer problem when AIsrc is @48kHz, should fix games like All Star Baseball 2004/
XGRA Extreme-G Racing Association/Conduit 2... Enabled 48kHz output for LLE (before it was just 32kHz). I hope it works, if there are serious problems, it will be reverted. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7511 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -22,6 +22,7 @@
|
||||
#include "UCode_AX_ADPCM.h"
|
||||
#include "UCode_AX.h"
|
||||
#include "Mixer.h"
|
||||
#include "../../AudioInterface.h"
|
||||
|
||||
// MRAM -> ARAM for GC
|
||||
inline bool ReadPB(u32 addr, AXPB &PB)
|
||||
@ -104,7 +105,7 @@ inline void MixAddVoice(ParamBlockType &pb,
|
||||
if (pb.running)
|
||||
{
|
||||
const u32 ratio = (u32)(((pb.src.ratio_hi << 16) + pb.src.ratio_lo)
|
||||
* /*ratioFactor:*/(32000.0f / (float)soundStream->GetMixer()->GetSampleRate()));
|
||||
* /*ratioFactor:*/((float)AudioInterface::GetAIDSampleRate() / (float)soundStream->GetMixer()->GetSampleRate()));
|
||||
u32 sampleEnd = (pb.audio_addr.end_addr_hi << 16) | pb.audio_addr.end_addr_lo;
|
||||
u32 loopPos = (pb.audio_addr.loop_addr_hi << 16) | pb.audio_addr.loop_addr_lo;
|
||||
|
||||
|
@ -157,7 +157,7 @@ u16 DSPLLE::DSP_WriteControlRegister(u16 _uFlag)
|
||||
{
|
||||
unsigned int AISampleRate, DACSampleRate;
|
||||
AudioInterface::Callback_GetSampleRate(AISampleRate, DACSampleRate);
|
||||
soundStream = AudioCommon::InitSoundStream(new CMixer(AISampleRate, DACSampleRate), m_hWnd);
|
||||
soundStream = AudioCommon::InitSoundStream(new CMixer(AISampleRate, DACSampleRate, ac_Config.iFrequency), m_hWnd);
|
||||
if(!soundStream) PanicAlert("Error starting up sound stream");
|
||||
// Mixer is initialized
|
||||
m_InitMixer = true;
|
||||
|
Reference in New Issue
Block a user