1#include "Game/Speaker/SpkSystem.hpp"
2#include "Game/Speaker/SpkSpeakerCtrl.hpp"
4SpkSystem::SpkSystem(JKRHeap *pHeap) : JASGlobalInstance(this) {
8 pHeap = JKRHeap::sCurrentHeap;
14 SpkSpeakerCtrl::setup();
15 SpkSpeakerCtrl::setMixingBuffer(mMixBuffer);
18void SpkSystem::setResource(JKRArchive *pArchive, u16 a2, u16 a3) {
19 mData =
new(mHeap, 0)
SpkData(pArchive);
24void SpkSystem::framework() {
25 SpkSpeakerCtrl::framework();
26 mSoundHolder->framework();
29void SpkSystem::startSound(s32 a1, s32 a2,
SpkSoundHandle *pHandle) {
30 mSoundHolder->startSound(a1, a2, pHandle);
33void SpkSystem::newSoundMemPool(s32 a1) {
34 JASPoolAllocObject<SpkSystem>::memPool_.newMemPool(0x60, a1);
37void SpkSystem::connect(s32 chan) {
38 SpkSpeakerCtrl::connect(chan);
41void SpkSystem::disconnect(s32 chan) {
42 SpkSpeakerCtrl::disconnect(chan);
45void SpkSystem::reconnect(s32 chan) {
47 for (
int i = 0; i < 4; i++) {
48 SpkSpeakerCtrl::reconnect(i);
52 SpkSpeakerCtrl::reconnect(chan);
56void SpkSystem::extensionProcess(s32 a1, s32 a2) {
57 SpkSpeakerCtrl::extensionProcess(a1, a2);
60f32 SpkSystem::getDeviceVolume(s32 chan) {
61 return SpkSpeakerCtrl::getDeviceVolume(chan);