Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion include/Inagaki/GameAudioMain.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ class Main
JAISoundHandle _24[4]; //
JAISoundHandle _34[4]; //
FxLineConfig *mConfig; // 44
u8 _48[4]; //
u8 mState; // 48
u8 _padding[3]; //
PAUSE_STATUS mPauseStatus; // 4C
int _50; //
u8 _54[0x64 - 0x54]; //
Expand Down
31 changes: 27 additions & 4 deletions src/Inagaki/GameAudioMain.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#include "Inagaki/GameAudioMain.h"
#include "Inagaki/GameMapSoundMgr.h"

#include "JSystem/JAudio/System/JASAudioThread.h"
#include "JSystem/JAudio/System/JASWaveArcLoader.h"
#include "JSystem/JAudio/System/JASWaveBank.h"

namespace GameAudio {

Expand All @@ -12,9 +15,13 @@ Main::Main() {

void Main::init(JKRSolidHeap *, u32, void *, void *, u32) {}

void Main::bootDSP() {}
void Main::bootDSP() {
JASAudioThread::bootDSP();
}

bool Main::isActive() {}
bool Main::isActive() {
return mState & 0x10;
}

void Main::initRaceSound() {}

Expand All @@ -24,7 +31,23 @@ void Main::changeSection(u32) {}

void Main::checkSection() {}

bool Main::isWaveLoaded(WS_ID) {}
bool Main::isWaveLoaded(WS_ID id) {
JAUSectionHeap* sectionHeap = JASGlobalInstance<JAUSectionHeap>::sInstance;
if(sectionHeap != nullptr)
{
JASWaveBank* bank = sectionHeap->sectionHeapData_.waveBankTable.getWaveBank(id);

if(bank != nullptr)
{
JASWaveArc* arc = bank->getWaveArc(0);
if (arc->_4c == 2) {
return true;
}
}
}

return false;
}

void Main::checkCourceOnRace() {}

Expand Down
Loading