Merge pull request #9813 from AdmiralCurtiss/cpu-cycles-per-sample

AudioInterface: Initialize s_cpu_cycles_per_sample to a sane value.
This commit is contained in:
JMC47 2021-06-14 09:13:23 -04:00 committed by GitHub
commit d2d3647b26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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);