Remove now useless NumFields Function which always returned 1.

This commit is contained in:
Scott Mansell 2015-02-10 00:40:50 +13:00
parent 8f416821ad
commit 4cb01673a0
4 changed files with 3 additions and 12 deletions

View File

@ -75,9 +75,8 @@ void DSPHLE::DSP_Update(int cycles)
u32 DSPHLE::DSP_UpdateRate() u32 DSPHLE::DSP_UpdateRate()
{ {
// AX HLE uses 3ms (Wii) or 5ms (GC) timing period // AX HLE uses 3ms (Wii) or 5ms (GC) timing period
int fields = VideoInterface::GetNumFields();
if (m_pUCode != nullptr) if (m_pUCode != nullptr)
return (SystemTimers::GetTicksPerSecond() / 1000) * m_pUCode->GetUpdateMs() / fields; return (SystemTimers::GetTicksPerSecond() / 1000) * m_pUCode->GetUpdateMs();
else else
return SystemTimers::GetTicksPerSecond() / 1000; return SystemTimers::GetTicksPerSecond() / 1000;
} }

View File

@ -114,8 +114,7 @@ static void DSPCallback(u64 userdata, int cyclesLate)
static void AudioDMACallback(u64 userdata, int cyclesLate) static void AudioDMACallback(u64 userdata, int cyclesLate)
{ {
int fields = VideoInterface::GetNumFields(); int period = CPU_CORE_CLOCK / (AudioInterface::GetAIDSampleRate() * 4 / 32);
int period = CPU_CORE_CLOCK / (AudioInterface::GetAIDSampleRate() * 4 / 32 * fields);
DSP::UpdateAudioDMA(); // Push audio to speakers. DSP::UpdateAudioDMA(); // Push audio to speakers.
CoreTiming::ScheduleEvent(period - cyclesLate, et_AudioDMA); CoreTiming::ScheduleEvent(period - cyclesLate, et_AudioDMA);
} }
@ -242,7 +241,7 @@ void Init()
// FYI, WII_IPC_HLE_Interface::Update is also called in WII_IPCInterface::Write32 // FYI, WII_IPC_HLE_Interface::Update is also called in WII_IPCInterface::Write32
const int freq = 1500; const int freq = 1500;
IPC_HLE_PERIOD = GetTicksPerSecond() / (freq * VideoInterface::GetNumFields()); IPC_HLE_PERIOD = GetTicksPerSecond() / freq;
} }
// System internal sample rate is fixed at 32KHz * 4 (16bit Stereo) / 32 bytes DMA // System internal sample rate is fixed at 32KHz * 4 (16bit Stereo) / 32 bytes DMA

View File

@ -476,11 +476,6 @@ void UpdateParameters()
} }
} }
int GetNumFields()
{
return 1;
}
unsigned int GetTicksPerLine() unsigned int GetTicksPerLine()
{ {
if (s_lineCount == 0) if (s_lineCount == 0)

View File

@ -353,6 +353,4 @@ union UVIHorizontalStepping
unsigned int GetTicksPerLine(); unsigned int GetTicksPerLine();
unsigned int GetTicksPerFrame(); unsigned int GetTicksPerFrame();
int GetNumFields();
} }