AudioInterface: Initialize s_cpu_cycles_per_sample to a sane value.

This commit is contained in:
Admiral H. Curtiss 2021-06-13 20:41:20 +02:00
parent c2ac21c8d6
commit 360d05fe21
1 changed files with 2 additions and 2 deletions

View File

@ -111,7 +111,7 @@ static u32 s_sample_counter = 0;
static u32 s_interrupt_timing = 0;
static u64 s_last_cpu_time = 0;
static u64 s_cpu_cycles_per_sample = 0xFFFFFFFFFFFULL;
static u64 s_cpu_cycles_per_sample = 0;
static u32 s_ais_sample_rate = 48000;
static u32 s_aid_sample_rate = 32000;
@ -148,10 +148,10 @@ void Init()
s_interrupt_timing = 0;
s_last_cpu_time = 0;
s_cpu_cycles_per_sample = 0xFFFFFFFFFFFULL;
s_ais_sample_rate = Get48KHzSampleRate();
s_aid_sample_rate = Get32KHzSampleRate();
s_cpu_cycles_per_sample = SystemTimers::GetTicksPerSecond() / s_ais_sample_rate;
event_type_ai = CoreTiming::RegisterEvent("AICallback", Update);