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
+56 -53
View File
@@ -6,33 +6,33 @@
class Z2SoundStarter;
class Z2SoundObjBase : public Z2SoundHandles {
class Z2SoundObjBase : public Z2SoundHandles
#if VERSION == VERSION_SHIELD_DEBUG
, public JSULink<Z2SoundObjBase>
#endif
{
public:
Z2SoundObjBase();
~Z2SoundObjBase();
void deleteObject();
Z2SoundHandlePool* startCollisionSE(u32, u32, Z2SoundObjBase*);
Z2SoundHandlePool* startCollisionSE(u32 hitID, u32 mapinfo, Z2SoundObjBase* other);
bool isAlive() const { return mIsInitialized; }
void setSoundStarter(Z2SoundStarter* i_soundStarter) { mSoundStarter = i_soundStarter; }
bool isAlive() { return alive_; }
void setSoundStarter(Z2SoundStarter* soundStarter) { soundStarter_ = soundStarter; }
#if VERSION == VERSION_SHIELD_DEBUG
/* 0x10 */ u8 unk_0x10[0x20 - 0x10];
#endif
virtual void framework(u32, s8 reverb);
virtual void framework(u32 mapinfo, s8 reverb);
virtual void dispose();
virtual bool stopOK(Z2SoundHandlePool& pool);
virtual void init(Vec* pSoundPos, u8 pNumHandles);
virtual Z2SoundHandlePool* startSound(JAISoundID, u32, s8);
virtual Z2SoundHandlePool* startLevelSound(JAISoundID, u32, s8);
virtual bool stopOK(Z2SoundHandlePool& handlePool);
virtual void init(Vec* posPtr, u8 handleNum);
virtual Z2SoundHandlePool* startSound(JAISoundID soundID, u32 mapinfo, s8 reverb);
virtual Z2SoundHandlePool* startLevelSound(JAISoundID soundID, u32 mapinfo, s8 reverb);
/* 0x14 */ Z2SoundStarter* mSoundStarter;
/* 0x18 */ JGeometry::TVec3<f32>* mSoundPos;
/* 0x14 */ Z2SoundStarter* soundStarter_;
/* 0x18 */ JGeometry::TVec3<f32>* pos_;
/* 0x1C */ u16 field_0x1c;
/* 0x1E */ s8 field_0x1e;
/* 0x1F */ bool mIsInitialized;
/* 0x1E */ s8 reverb_;
/* 0x1F */ bool alive_;
};
class Z2SoundObjSimple : public Z2SoundObjBase {
@@ -40,51 +40,54 @@ public:
Z2SoundObjSimple();
~Z2SoundObjSimple() {}
virtual void init(Vec* pSoundPos, u8 pNumHandles);
virtual Z2SoundHandlePool* startSound(JAISoundID, u32, s8);
virtual Z2SoundHandlePool* startLevelSound(JAISoundID, u32, s8);
virtual void init(Vec* posPtr, u8 handleNum);
virtual Z2SoundHandlePool* startSound(JAISoundID soundID, u32 mapinfo, s8 reverb);
virtual Z2SoundHandlePool* startLevelSound(JAISoundID soundID, u32 mapinfo, s8 reverb);
};
class Z2SoundObjAnime : public Z2SoundObjBase {
public:
/* 802BEB94 */ Z2SoundObjAnime();
/* 802BEBFC */ void initAnime(void*, bool, f32, f32);
/* 802BEBFC */ void initAnime(void* animation, bool, f32 startFrame, f32);
/* 802BED68 */ void ageSounds_();
/* 802BEED4 */ void updateAnime(f32, f32);
/* 802BF304 */ void updateSoundLifeTime_(f32, f32);
/* 802BF660 */ void startSoundInner(JGeometry::TVec3<f32> const&, f32, Z2SoundStarter*, u32,
s8);
/* 802BF890 */ u32 getSoundID(JAUSoundAnimationSound const*,
JGeometry::TVec3<f32> const&, f32);
/* 802BF898 */ bool playsSound(JAUSoundAnimationSound const*, JGeometry::TVec3<f32> const&,
f32);
/* 802BF660 */ void startSoundInner(const JGeometry::TVec3<f32>& pos, f32 param_1,
Z2SoundStarter* soundStarter, u32 mapinfo, s8 reverb);
/* 802BF890 */ u32 getSoundID(const JAUSoundAnimationSound* animationSound, const JGeometry::TVec3<f32>&, f32);
/* 802BF898 */ bool playsSound(const JAUSoundAnimationSound* animationSound, const JGeometry::TVec3<f32>&, f32);
/* 802BEBDC */ virtual void init(Vec*, u8);
/* 802BEBDC */ virtual void init(Vec* posPtr, u8 handleNum);
void stopAnime() { mpAnimation = NULL; }
void setLoopStartFrame(f32 i_frame) {
mStartSoundFrame = i_frame;
mStartSoundIndex = mpAnimation->getStartSoundIndex(i_frame);
}
void setLoopEndFrame(f32 i_frame) {
mEndSoundFrame = i_frame;
mEndSoundIndex = mpAnimation->getEndSoundIndex(i_frame);
}
void setLoopFrame(f32 i_startFrame, f32 i_endFrame) {
setLoopStartFrame(i_startFrame);
setLoopEndFrame(i_endFrame);
void stopAnime() { animation_ = NULL; }
void setLoopStartFrame(f32 frame) {
JUT_ASSERT(119, animation_);
startSoundFrame_ = frame;
startSoundIndex_ = animation_->getStartSoundIndex(frame);
}
/* 0x20 */ JAUSoundAnimation* mpAnimation;
void setLoopEndFrame(f32 frame) {
JUT_ASSERT(125, animation_);
endSoundFrame_ = frame;
endSoundIndex_ = animation_->getEndSoundIndex(frame);
}
void setLoopFrame(f32 startFrame, f32 endFrame) {
setLoopStartFrame(startFrame);
setLoopEndFrame(endFrame);
}
/* 0x20 */ JAUSoundAnimation* animation_;
/* 0x24 */ int field_0x24;
/* 0x28 */ f32 mCurSoundFrame;
/* 0x2C */ f32 mStartSoundFrame;
/* 0x30 */ f32 mEndSoundFrame;
/* 0x34 */ int mStartSoundIndex;
/* 0x38 */ int mEndSoundIndex;
/* 0x28 */ f32 curSoundFrame_;
/* 0x2C */ f32 startSoundFrame_;
/* 0x30 */ f32 endSoundFrame_;
/* 0x34 */ int startSoundIndex_;
/* 0x38 */ int endSoundIndex_;
/* 0x3C */ int field_0x3c;
/* 0x40 */ int mCurSoundIndex;
/* 0x44 */ bool mReverse;
/* 0x40 */ int curSoundIndex_;
/* 0x44 */ bool reverse_;
};
class Z2DopplerSoundObjBase : public Z2SoundObjBase {
@@ -92,10 +95,10 @@ public:
Z2DopplerSoundObjBase();
~Z2DopplerSoundObjBase();
virtual void framework(u32, s8);
virtual void init(Vec*, u8);
virtual Z2SoundHandlePool* startSound(JAISoundID, u32, s8);
virtual Z2SoundHandlePool* startLevelSound(JAISoundID, u32, s8);
virtual void framework(u32 mapinfo, s8 reverb);
virtual void init(Vec* posPtr, u8 handleNum);
virtual Z2SoundHandlePool* startSound(JAISoundID soundID, u32 mapinfo, s8 reverb);
virtual Z2SoundHandlePool* startLevelSound(JAISoundID soundID, u32 mapinfo, s8 reverb);
/* 0x20 */ JGeometry::TVec3<f32> field_0x20;
/* 0x2C */ JGeometry::TVec3<f32> field_0x2c;
@@ -104,7 +107,7 @@ public:
class Z2SoundObjArrow : public Z2DopplerSoundObjBase {
public:
/* 802BEB38 */ Z2SoundObjArrow();
/* 802BEB74 */ virtual void init(Vec*, u8);
/* 802BEB74 */ virtual void init(Vec* posPtr, u8 handleNum);
};
#endif /* Z2SOUNDOBJECT_H */