Files
tp/include/Z2AudioLib/Z2SoundMgr.h
T

57 lines
1.6 KiB
C++
Raw Normal View History

2021-03-28 22:49:05 +02:00
#ifndef Z2SOUNDMGR_H
#define Z2SOUNDMGR_H
2021-09-30 07:13:49 -07:00
#include "JSystem/JAudio2/JAISeMgr.h"
#include "JSystem/JAudio2/JAISeqMgr.h"
#include "JSystem/JAudio2/JAIStreamMgr.h"
2021-03-28 22:49:05 +02:00
u16 seqCallback(JASTrack* track, u16 command);
2023-09-15 05:20:09 -07:00
class Z2SoundMgr : public JASGlobalInstance<Z2SoundMgr> {
2021-09-30 07:13:49 -07:00
public:
2026-01-05 03:54:00 -08:00
#if PLATFORM_GCN
static const int MAX_CATEGORIES = 9;
#else
static const int MAX_CATEGORIES = 10;
#endif
2025-11-30 14:23:42 -08:00
Z2SoundMgr();
void calc();
void setIIR(JAISound* sound, const s16* iir);
void setFilterOff(JAISound* sound);
void resetFilterAll();
void mixOut();
void framework();
void pauseAllGameSound(bool paused);
void stopSoundID(JAISoundID soundID);
void stopSync();
void stop();
void initParams();
void multiVolumeSoundID(JAISoundID soundID, f32 volume);
bool isPlayingSoundID(JAISoundID soundID);
2021-09-30 07:13:49 -07:00
2025-11-30 14:23:42 -08:00
virtual bool startSound(JAISoundID soundID, JAISoundHandle* handle, const JGeometry::TVec3<f32>* posPtr);
2022-12-19 11:06:32 -08:00
JAISeMgr* getSeMgr() { return &seMgr_; }
const JAISeMgr* getSeMgr() const { return &seMgr_; }
JAISeqMgr* getSeqMgr() { return &seqMgr_; }
const JAISeqMgr* getSeqMgr() const { return &seqMgr_; }
JAIStreamMgr* getStreamMgr() { return &streamMgr_; }
2022-12-19 11:06:32 -08:00
2021-09-30 07:13:49 -07:00
private:
/* 0x004 */ JAISeMgr seMgr_;
/* 0x728 */ JAISeqMgr seqMgr_;
/* 0x79C */ JAIStreamMgr streamMgr_;
/* 0x80C */ JAISoundID soundID_;
2021-09-30 07:13:49 -07:00
}; // Size: 0x810
#if VERSION != VERSION_SHIELD_DEBUG
2021-09-30 07:13:49 -07:00
STATIC_ASSERT(sizeof(Z2SoundMgr) == 0x810);
#endif
2021-09-30 07:13:49 -07:00
2022-06-30 23:24:35 +02:00
inline Z2SoundMgr* Z2GetSoundMgr() {
return JASGlobalInstance<Z2SoundMgr>::getInstance();
2022-06-30 23:24:35 +02:00
}
2021-03-28 22:49:05 +02:00
#endif /* Z2SOUNDMGR_H */