From 360d05fe2128e13780e9384a9941a711bfb4b076 Mon Sep 17 00:00:00 2001 From: "Admiral H. Curtiss" Date: Sun, 13 Jun 2021 20:41:20 +0200 Subject: [PATCH] AudioInterface: Initialize s_cpu_cycles_per_sample to a sane value. --- Source/Core/Core/HW/AudioInterface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/HW/AudioInterface.cpp b/Source/Core/Core/HW/AudioInterface.cpp index 1fe355cfa3..d29ee0801a 100644 --- a/Source/Core/Core/HW/AudioInterface.cpp +++ b/Source/Core/Core/HW/AudioInterface.cpp @@ -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);