mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-05 10:47:27 -04:00
Reorganize library code into libs/ (#3119)
* Reorganize files into libs/{dolphin,JSystem,PowerPC_EABI_Support,revolution,TRK_MINNOW_DOLPHIN}
* Update configure.py and project.py for new libs structure
* Refactor `#include <dolphin/x.h>` -> `<x.h>`
* Remove `__REVOLUTION_SDK__` forwards from dolphin
* Fix dolphin/ references in revolution
* Wrap `#include <dolphin.h>` in `!__REVOLUTION_SDK__`
* Always build TRK against dolphin headers
* Resolve revolution SDK header resolution issues
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
#include "JSystem/JSystem.h" // IWYU pragma: keep
|
||||
|
||||
#include "JSystem/JAudio2/JASProbe.h"
|
||||
#include "JSystem/JAudio2/JASCriticalSection.h"
|
||||
|
||||
void JASProbe::start(char const* name) {
|
||||
JASCriticalSection cs;
|
||||
mName = name;
|
||||
mStartTime = OSGetTime();
|
||||
}
|
||||
|
||||
|
||||
void JASProbe::stop() {
|
||||
JASCriticalSection cs;
|
||||
u32 r29 = OSGetTime();
|
||||
_08 = r29 - mStartTime;
|
||||
_08 /= OS_TIMER_CLOCK / 59.94f;
|
||||
if (_10 < _08 && 100 < _1A8) {
|
||||
_10 = _08;
|
||||
}
|
||||
_0C = _0C * 0.96f + _08 * 0.04f;
|
||||
u32 resultIndex = _1A8 % 100;
|
||||
_14 -= _18[resultIndex];
|
||||
_18[resultIndex] = _08;
|
||||
_14 += _08;
|
||||
_1A8++;
|
||||
}
|
||||
|
||||
JASProbe* JASProbe::sProbeTable[16];
|
||||
|
||||
void JASProbe::start(s32 index, char const* name) {
|
||||
JASProbe* probe;
|
||||
if (index < 16) {
|
||||
probe = sProbeTable[index];
|
||||
if (probe != NULL) {
|
||||
probe->start(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void JASProbe::stop(s32 index) {
|
||||
JASProbe* probe;
|
||||
if (index < 16) {
|
||||
probe = sProbeTable[index];
|
||||
if (probe != NULL) {
|
||||
probe->stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user