diff options
| author | bunnei <bunneidev@gmail.com> | 2023-06-21 21:12:46 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-21 21:12:46 -0700 |
| commit | e3122c5b468fd59b7eded5a3a7300643d05616bc (patch) | |
| tree | 3fe4c2c0bea83f3bb8849ef8839b9520873d41c2 /src/audio_core/renderer/command | |
| parent | 7eb7d56b1bf96267969a913940ae9e35581ab27a (diff) | |
| parent | 3e6d81a00899f7f488bfedd849edb64f927b124d (diff) | |
Merge pull request #10086 from Morph1984/coretiming-ng-1
core_timing: Use CNTPCT as the guest CPU tick
Diffstat (limited to 'src/audio_core/renderer/command')
| -rw-r--r-- | src/audio_core/renderer/command/performance/performance.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/audio_core/renderer/command/performance/performance.cpp b/src/audio_core/renderer/command/performance/performance.cpp index 985958b03..4a881547f 100644 --- a/src/audio_core/renderer/command/performance/performance.cpp +++ b/src/audio_core/renderer/command/performance/performance.cpp @@ -5,7 +5,6 @@ #include "audio_core/renderer/command/performance/performance.h" #include "core/core.h" #include "core/core_timing.h" -#include "core/core_timing_util.h" namespace AudioCore::AudioRenderer { @@ -18,20 +17,18 @@ void PerformanceCommand::Process(const ADSP::CommandListProcessor& processor) { auto base{entry_address.translated_address}; if (state == PerformanceState::Start) { auto start_time_ptr{reinterpret_cast<u32*>(base + entry_address.entry_start_time_offset)}; - *start_time_ptr = static_cast<u32>( - Core::Timing::CyclesToUs(processor.system->CoreTiming().GetClockTicks() - - processor.start_time - processor.current_processing_time) - .count()); + *start_time_ptr = + static_cast<u32>(processor.system->CoreTiming().GetClockTicks() - processor.start_time - + processor.current_processing_time); } else if (state == PerformanceState::Stop) { auto processed_time_ptr{ reinterpret_cast<u32*>(base + entry_address.entry_processed_time_offset)}; auto entry_count_ptr{ reinterpret_cast<u32*>(base + entry_address.header_entry_count_offset)}; - *processed_time_ptr = static_cast<u32>( - Core::Timing::CyclesToUs(processor.system->CoreTiming().GetClockTicks() - - processor.start_time - processor.current_processing_time) - .count()); + *processed_time_ptr = + static_cast<u32>(processor.system->CoreTiming().GetClockTicks() - processor.start_time - + processor.current_processing_time); (*entry_count_ptr)++; } } |
