Fix errors when building with -ipa program (#3035)

This commit is contained in:
Max Roncace
2026-01-11 22:25:26 -05:00
committed by GitHub
parent e3610729d9
commit 919a7aaa96
17 changed files with 88 additions and 91 deletions
+5 -13
View File
@@ -4,16 +4,9 @@
#include "JSystem/JAudio2/JASAudioThread.h"
#include "JSystem/JAudio2/JASCriticalSection.h"
#include "JSystem/JAudio2/JASDriverIF.h"
#include "JSystem/JAudio2/JASDSPChannel.h"
#include "dolphin/types.h"
struct JASDSPChannel {
void drop();
static JASDSPChannel* getHandle(u32);
inline u8 getStatus() const { return mStatus; }
u32 mStatus;
};
JASAudioReseter::JASAudioReseter() {
field_0x0 = 0;
mDoneFlag = true;
@@ -52,16 +45,15 @@ s32 JASAudioReseter::checkDone() const {
return mDoneFlag;
}
s32 JASAudioReseter::calc() {
if(field_0x0==0) {
for(size_t i = 0; i<64; i++) {
if (field_0x0==0) {
for (size_t i = 0; i<64; i++) {
JASDSPChannel* handle = JASDSPChannel::getHandle(i);
if ((handle->getStatus())==0) {
if (handle->getStatus() == 0) {
handle->drop();
}
}
if(mThreadStopFlag!=false) {
if (mThreadStopFlag!=false) {
JASAudioThread* pAudioThread = JASGlobalInstance<JASAudioThread>::getInstance();
JUT_ASSERT(78, pAudioThread);
pAudioThread->stop();
+1 -1
View File
@@ -9,7 +9,7 @@ static void DspHandShake(void* param_0);
static int DspStartWork(u32 param_0, void (*param_1)(u16));
extern int Dsp_Running_Check();
extern int Dsp_Running_Start();
extern void Dsp_Running_Start();
void DspHandShake(void*) {
OS_REPORT("DSP InitCallback \n");
+2 -2
View File
@@ -151,8 +151,8 @@ static void Dsp_Update_Request() {
}
}
bool Dsp_Running_Check() {
return struct_80451308 == 1;
int Dsp_Running_Check() {
return struct_80451308 == 1 ? TRUE : FALSE;
}
void Dsp_Running_Start() {
+1 -66
View File
@@ -1,7 +1,6 @@
#include "JSystem/JSystem.h" // IWYU pragma: keep
// don't include header until this "zero" mess is figured out
// #include "JSystem/JMath/JMATrigonometric.h"
#include "JSystem/JMath/JMATrigonometric.h"
#include <math>
#include "global.h"
@@ -9,78 +8,14 @@ static f32 dummy() {
return 0.0f;
}
namespace std {
template <typename A1, typename B1>
struct pair {
A1 a1;
B1 b1;
pair() {
a1 = A1();
b1 = B1();
}
};
} // namespace std
namespace JMath {
template<typename T>
struct TAngleConstant_;
template<>
struct TAngleConstant_<f32> {
static f32 RADIAN_DEG180() { return M_PI;}
static f32 RADIAN_DEG360() { return M_PI * 2; }
};
template<int N, typename T>
struct TSinCosTable {
std::pair<T, T> table[1 << N];
TSinCosTable() {
init();
}
void init() {
for (int i = 0; i < 1 << N; i++) {
table[i].a1 = sin((i * f64(TAngleConstant_<f32>::RADIAN_DEG360())) / (1 << N));
table[i].b1 = cos((i * f64(TAngleConstant_<f32>::RADIAN_DEG360())) / (1 << N));
}
}
};
inline f64 getConst2() {
return 9.765625E-4;
}
template<int N, typename T>
struct TAtanTable {
T table[N + 1];
u8 pad[0x1C];
TAtanTable() {
init();
}
void init() {
for (int i = 0; i < u32(N); i++) {
table[i] = atan(getConst2() * i);
}
table[0] = 0.0f;
table[N] = TAngleConstant_<f32>::RADIAN_DEG180() * 0.25f; // 0.25 * PI
}
};
template<int N, typename T>
struct TAsinAcosTable {
T table[N + 1];
u8 pad[0x1C];
TAsinAcosTable() {
init();
}
void init() {
for (int i = 0; i < N; i++) {
table[i] = asin(getConst2() * i);
}
table[0] = 0.0f;
table[N] = TAngleConstant_<f32>::RADIAN_DEG180() * 0.25f; // 0.25 * PI
}
};
TSinCosTable<13, f32> sincosTable_ ATTRIBUTE_ALIGN(32);
TAtanTable<1024, f32> atanTable_ ATTRIBUTE_ALIGN(32);