diff options
| author | Jcw87 <Jcw87@users.noreply.github.com> | 2025-12-26 13:20:53 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-26 13:20:53 -0800 |
| commit | bae6d9da2d03ea94d7eb87c8fe5255abd01f34c6 (patch) | |
| tree | 2d3191ea80511e80c23b1cd879054926bc5a6a8d /src/JSystem/JAudio2/JASProbe.cpp | |
| parent | 67b576ad9aec15953fa0d52f33cc88e8a783b46b (diff) | |
JAudio2 debug (#2996)
Diffstat (limited to 'src/JSystem/JAudio2/JASProbe.cpp')
| -rw-r--r-- | src/JSystem/JAudio2/JASProbe.cpp | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/src/JSystem/JAudio2/JASProbe.cpp b/src/JSystem/JAudio2/JASProbe.cpp index 3fcbcc6112..55a63e67c8 100644 --- a/src/JSystem/JAudio2/JASProbe.cpp +++ b/src/JSystem/JAudio2/JASProbe.cpp @@ -1,19 +1,19 @@ #include "JSystem/JSystem.h" // IWYU pragma: keep #include "JSystem/JAudio2/JASProbe.h" -#include "dolphin/os.h" +#include "JSystem/JAudio2/JASCriticalSection.h" void JASProbe::start(char const* name) { - volatile BOOL interrupts = OSDisableInterrupts(); - mName = name; - mStartTime = OSGetTime(); - OSRestoreInterrupts(interrupts); + JASCriticalSection cs; + mName = name; + mStartTime = OSGetTime(); } void JASProbe::stop() { - volatile int interrupts = OSDisableInterrupts(); - _08 = (u32)OSGetTime() - mStartTime; + JASCriticalSection cs; + u32 r29 = OSGetTime(); + _08 = r29 - mStartTime; _08 /= OS_TIMER_CLOCK / 59.94f; if (_10 < _08 && 100 < _1A8) { _10 = _08; @@ -24,23 +24,26 @@ void JASProbe::stop() { _18[resultIndex] = _08; _14 += _08; _1A8++; - OSRestoreInterrupts(interrupts); } JASProbe* JASProbe::sProbeTable[16]; void JASProbe::start(s32 index, char const* name) { + JASProbe* probe; if (index < 16) { - if (sProbeTable[index] != NULL) { - sProbeTable[index]->start(name); + probe = sProbeTable[index]; + if (probe != NULL) { + probe->start(name); } } } void JASProbe::stop(s32 index) { + JASProbe* probe; if (index < 16) { - if (sProbeTable[index] != NULL) { - sProbeTable[index]->stop(); + probe = sProbeTable[index]; + if (probe != NULL) { + probe->stop(); } } } |
