Files
dusklight/src/JSystem/JAudio2/JAISoundHandles.cpp
T
TakaRikka a6e76c0841 project cleanup (#2895)
* some wii OS fixes

* remove old dol2asm comments

* remove dol2asm.h

* remove function address comments

* normalize ATTRIBUTE_ALIGN usage

* DECL_WEAK macro

* fix gcc attribute weak macro

* wrap more mwcc specific things in ifdefs

* fixes

* fix revo sdk version flags

* fixes
2025-11-30 15:23:42 -07:00

26 lines
592 B
C++

#include "JSystem/JSystem.h" // IWYU pragma: keep
#include "JSystem/JAudio2/JAISoundHandles.h"
JAISoundHandle* JAISoundHandles::getHandleSoundID(JAISoundID id) {
for (int i = 0; i < numHandles_; i++) {
if (handle_[i].isSoundAttached()) {
if (handle_[i]->getID() == id) {
return &handle_[i];
}
}
}
return NULL;
}
JAISoundHandle* JAISoundHandles::getFreeHandle() {
for (int i = 0; i < numHandles_; i++) {
if (!handle_[i].isSoundAttached()) {
return &handle_[i];
}
}
return NULL;
}