Files
dusklight/libs/JSystem/src/JAudio2/JAISoundStarter.cpp
T
Luke Street 4df8ccc871 Reorganize library code into libs/ (#3119)
* Reorganize files into libs/{dolphin,JSystem,PowerPC_EABI_Support,revolution,TRK_MINNOW_DOLPHIN}

* Update configure.py and project.py for new libs structure

* Refactor `#include <dolphin/x.h>` -> `<x.h>`

* Remove `__REVOLUTION_SDK__` forwards from dolphin

* Fix dolphin/ references in revolution

* Wrap `#include <dolphin.h>` in `!__REVOLUTION_SDK__`

* Always build TRK against dolphin headers

* Resolve revolution SDK header resolution issues
2026-03-01 14:35:36 -08:00

30 lines
883 B
C++

#include "JSystem/JSystem.h" // IWYU pragma: keep
#include "JSystem/JAudio2/JAISoundStarter.h"
#include "JSystem/JAudio2/JAISoundHandles.h"
JAISoundStarter::JAISoundStarter(bool setInstance) :
JASGlobalInstance<JAISoundStarter>(setInstance) {}
JAISoundStarter::~JAISoundStarter() {}
bool JAISoundStarter::startLevelSound(JAISoundID id, JAISoundHandle* handlePtr, const JGeometry::TVec3<f32>* posPtr) {
JUT_ASSERT(20, handlePtr);
JAISoundHandle* handlePtr2 = handlePtr;
if (*handlePtr2) {
if ((*handlePtr2)->getID() == id) {
(*handlePtr2)->updateLifeTime(1);
if (posPtr != NULL) {
(*handlePtr2)->setPos(*posPtr);
}
return true;
}
}
bool rt = startSound(id, handlePtr, posPtr);
if (rt && *handlePtr2) {
(*handlePtr2)->setLifeTime(1, false);
}
return rt;
}