summaryrefslogtreecommitdiff
path: root/include/Z2AudioCS/SpkSystem.h
diff options
context:
space:
mode:
authorMax Roncace <me@caseif.net>2026-02-20 05:53:27 -0500
committerGitHub <noreply@github.com>2026-02-20 02:53:27 -0800
commit803bc041c7e228e2b7c88afd1121550e51db3f82 (patch)
tree5462e8061bc8a8084db8ea2fc677a0fef5bb16d1 /include/Z2AudioCS/SpkSystem.h
parent0558bde1e61374f5a1b54453f07fe6cc15525bc1 (diff)
Implement Z2AudioCS (#3103)
Diffstat (limited to 'include/Z2AudioCS/SpkSystem.h')
-rw-r--r--include/Z2AudioCS/SpkSystem.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/include/Z2AudioCS/SpkSystem.h b/include/Z2AudioCS/SpkSystem.h
new file mode 100644
index 0000000000..05541c72e5
--- /dev/null
+++ b/include/Z2AudioCS/SpkSystem.h
@@ -0,0 +1,38 @@
+#ifndef Z2AUDIOCS_SPKSYSTEM_H
+#define Z2AUDIOCS_SPKSYSTEM_H
+
+#include "Z2AudioCS/SpkData.h"
+#include "Z2AudioCS/SpkMixingBuffer.h"
+#include "Z2AudioCS/SpkSound.h"
+#include "JSystem/JAudio2/JASGadget.h"
+#include "JSystem/JKernel/JKRArchive.h"
+#include "JSystem/JKernel/JKRHeap.h"
+#include <revolution/types.h>
+
+class SpkSystem : protected JASGlobalInstance<SpkSystem> {
+public:
+ SpkSystem(JKRHeap* heap);
+ void setResource(JKRArchive* resArc, u16, u16);
+ void framework(void);
+ void startSound(s32 chan, s32 param_1, SpkSoundHandle* handle);
+ void startLevelSound(s32 chan, s32 param_1, SpkSoundHandle* handle);
+ void stopAll(s32 chan, s32 msec);
+ void setMasterVolume(f32 vol);
+ f32 getMasterVolume(void);
+ void setConfigVolume(s32 vol);
+ static void newSoundMemPool(s32 numOfSound);
+ static void connect(s32 chan);
+ static void disconnect(s32 chan);
+ static void extensionProcess(s32, s32);
+
+ inline SpkData* getData(void) const { return mData; }
+ inline SpkMixingBuffer* getMixingBuffer(void) const { return mMixingBuffer; }
+
+private:
+ /* 0x00 */ JKRHeap* mHeap;
+ /* 0x04 */ SpkData* mData;
+ /* 0x08 */ SpkMixingBuffer* mMixingBuffer;
+ /* 0x0C */ SpkSoundHolder* mSoundHolder;
+};
+
+#endif /* Z2AUDIOCS_SPKSYSTEM_H */