2021-03-28 22:49:05 +02:00
|
|
|
#ifndef Z2SOUNDHANDLES_H
|
|
|
|
|
#define Z2SOUNDHANDLES_H
|
|
|
|
|
|
2021-05-23 03:09:59 -07:00
|
|
|
#include "JSystem/JAudio2/JAISound.h"
|
2023-05-12 12:10:14 -07:00
|
|
|
#include "JSystem/JAudio2/JAISoundHandles.h"
|
2021-05-23 03:09:59 -07:00
|
|
|
#include "JSystem/JSupport/JSUList.h"
|
2021-03-28 22:49:05 +02:00
|
|
|
#include "dolphin/types.h"
|
|
|
|
|
|
2021-05-23 03:09:59 -07:00
|
|
|
class Z2SoundHandlePool : public JAISoundHandle, JSULink<Z2SoundHandlePool> {};
|
|
|
|
|
|
|
|
|
|
class Z2SoundHandles : protected JSUList<Z2SoundHandlePool> {
|
|
|
|
|
public:
|
|
|
|
|
Z2SoundHandles();
|
|
|
|
|
~Z2SoundHandles();
|
|
|
|
|
|
|
|
|
|
void initHandlesPool(u8 pNumHandles);
|
|
|
|
|
void deleteHandlesPool();
|
|
|
|
|
void getFreeHandle();
|
|
|
|
|
void getLowPrioSound(JAISoundID);
|
|
|
|
|
|
|
|
|
|
bool isActive() const;
|
|
|
|
|
|
|
|
|
|
JAISoundHandle* getHandleSoundID(JAISoundID pSoundId);
|
|
|
|
|
JAISoundHandle* getHandleUserData(u32 pUserData);
|
|
|
|
|
|
|
|
|
|
void stopAllSounds(u32 fadeout);
|
|
|
|
|
|
|
|
|
|
void setPos(const JGeometry::TVec3<f32>& pos);
|
|
|
|
|
|
|
|
|
|
u32 getNumHandles() const { return this->getNumLinks(); }
|
|
|
|
|
|
|
|
|
|
private:
|
2022-12-19 11:06:32 -08:00
|
|
|
/* 0xC */ u8 mNumHandles;
|
2021-05-23 03:09:59 -07:00
|
|
|
};
|
|
|
|
|
|
2021-03-28 22:49:05 +02:00
|
|
|
#endif /* Z2SOUNDHANDLES_H */
|