diff options
| author | JMC47 <JMC4789@gmail.com> | 2021-06-14 09:13:23 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-14 09:13:23 -0400 |
| commit | d2d3647b26976e0f90ef5b0b59416dfe2eedfa5b (patch) | |
| tree | fff72bd8be9a782a36f019070cf5d7f292f62ca5 /Source/Core | |
| parent | c2ac21c8d6a65583df7cd6efe87199333ceb4037 (diff) | |
| parent | 360d05fe2128e13780e9384a9941a711bfb4b076 (diff) | |
Merge pull request #9813 from AdmiralCurtiss/cpu-cycles-per-sample
AudioInterface: Initialize s_cpu_cycles_per_sample to a sane value.
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/HW/AudioInterface.cpp | 4 |
1 files 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); |
