various Z2Audio / JAudio debug cleanup (#2876)

* some JAudio work

* audio cleanup checkpoint

* checkpoint more audio cleanup

* fix symbols

* more z2 cleanup

* fix regression

* fix build

* some fixes
This commit is contained in:
TakaRikka
2025-11-27 21:19:33 -08:00
committed by GitHub
parent 767caeecc3
commit 6f96e66518
113 changed files with 6425 additions and 5542 deletions
+14 -9
View File
@@ -14,33 +14,38 @@ public:
Z2SoundHandles();
~Z2SoundHandles();
void initHandlesPool(u8 pNumHandles);
void initHandlesPool(u8 handleNum);
void deleteHandlesPool();
Z2SoundHandlePool* getFreeHandle();
Z2SoundHandlePool* getLowPrioSound(JAISoundID pSoundId);
Z2SoundHandlePool* getLowPrioSound(JAISoundID soundID);
bool isActive() const;
Z2SoundHandlePool* getHandleSoundID(JAISoundID pSoundId);
Z2SoundHandlePool* getHandleUserData(u32 pUserData);
Z2SoundHandlePool* getHandleSoundID(JAISoundID soundID);
Z2SoundHandlePool* getHandleUserData(u32 userData);
void stopAllSounds(u32 fadeout);
void stopAllSounds(u32 fadeTime);
void stopSound(JAISoundID soundID, u32 param_1) {
void stopSound(JAISoundID soundID, u32 fadeTime) {
// u32 cast is a fakematch
JAISoundHandle* phandle = getHandleSoundID((u32)soundID);
if (phandle != NULL) {
(*phandle)->stop(param_1);
(*phandle)->stop(fadeTime);
}
}
void setPos(const JGeometry::TVec3<f32>& pos);
int getNumHandles() const { return getNumLinks(); }
Z2SoundHandlePool* getHandle(int index) { return (Z2SoundHandlePool*)getNth(index); }
Z2SoundHandlePool* getHandle(int index) {
JUT_ASSERT(49, index >= 0);
JUT_ASSERT(50, index < getNumLinks());
return (Z2SoundHandlePool*)getNth(index);
}
private:
/* 0xC */ u8 mNumHandles;
/* 0xC */ u8 handleNum_;
};
#endif /* Z2SOUNDHANDLES_H */