Files
tp/include/JSystem/JAudio2/JAISoundHandles.h
T
hatal175 2275eb710b Work on J2DMaterialFactory (#394)
* Work on J2DMaterialFactory

* J3DUClipper OK

* Work on JAISoundStarter

* JAISoundHandles OK

* JAISoundInfo OK

* Fix JAISound::isStopping

* Work on J2DTextBoxEx

* dspproc OK

* osdsp OK

* osdsp_task OK

* Work on dsptask

* Import some JASCalc code

* JASCallback OK

* JASOscillator OK

* JASLfo OK
2023-08-01 00:17:21 -07:00

48 lines
1010 B
C++

#ifndef JAISOUNDHANDLES_H
#define JAISOUNDHANDLES_H
#include "JSystem/JAudio2/JAISound.h"
#include "JSystem/JUtility/JUTAssert.h"
#include "dolphin/types.h"
class JAISound;
class JAISoundID;
class JAISoundHandle {
public:
JAISoundHandle() {sound_ = NULL;};
~JAISoundHandle() {}
bool isSoundAttached() const { return sound_ != NULL; }
JAISound* operator->() const {
JUT_ASSERT("JAISound.h", 58, sound_ != 0);
return sound_;
}
operator bool() const { return isSoundAttached(); }
void releaseSound();
JAISound* getSound() { return sound_; }
JAISound* sound_; // member from assert in operator->()
};
class JAISoundHandles {
public:
JAISoundHandles(JAISoundHandle* pHandle, int param_1) {
mSoundHandle = pHandle;
numHandles_ = param_1;
};
JAISoundHandle* getHandleSoundID(JAISoundID);
JAISoundHandle* getFreeHandle();
private:
JAISoundHandle* mSoundHandle;
int numHandles_;
};
#endif /* JAISOUNDHANDLES_H */