2022-10-09 05:13:17 +00:00
|
|
|
#ifndef _CAUDIOSYS
|
|
|
|
#define _CAUDIOSYS
|
2022-08-13 01:26:00 +00:00
|
|
|
|
|
|
|
#include "types.h"
|
|
|
|
|
2022-12-01 13:45:36 +00:00
|
|
|
#include "Kyoto/Math/CVector3f.hpp"
|
|
|
|
|
2022-09-13 04:26:54 +00:00
|
|
|
enum ETRKSampleRate {
|
|
|
|
kTSR_Zero,
|
|
|
|
kTSR_One,
|
|
|
|
// TODO
|
|
|
|
};
|
|
|
|
|
|
|
|
enum ETRKRepeatMode {
|
|
|
|
// TODO
|
|
|
|
};
|
|
|
|
|
2022-08-13 01:26:00 +00:00
|
|
|
class CAudioSys {
|
|
|
|
public:
|
2022-10-31 16:19:28 +00:00
|
|
|
enum ESurroundModes { kSM_Mono, kSM_Stereo, kSM_Surround };
|
|
|
|
|
2022-12-01 13:45:36 +00:00
|
|
|
struct C3DEmitterParmData {
|
|
|
|
C3DEmitterParmData(const CVector3f& pos, const CVector3f& dir, float maxDist, float distComp,
|
|
|
|
uint flags, ushort sfxId, float maxVol, float minVol, bool important,
|
|
|
|
uchar prio)
|
|
|
|
: x0_pos(pos)
|
|
|
|
, xc_dir(dir)
|
|
|
|
, x18_maxDist(maxDist)
|
|
|
|
, x1c_distComp(distComp)
|
|
|
|
, x20_flags(flags)
|
|
|
|
, x24_sfxId(sfxId)
|
|
|
|
, x26_maxVol(maxVol)
|
|
|
|
, x27_minVol(minVol)
|
|
|
|
, x28_important(important)
|
|
|
|
, x29_prio(prio) {}
|
|
|
|
|
|
|
|
CVector3f x0_pos;
|
|
|
|
CVector3f xc_dir;
|
|
|
|
float x18_maxDist;
|
|
|
|
float x1c_distComp;
|
|
|
|
uint x20_flags;
|
|
|
|
ushort x24_sfxId;
|
|
|
|
float x26_maxVol;
|
|
|
|
float x27_minVol;
|
|
|
|
bool x28_important; // Can't be allocated over, regardless of priority
|
|
|
|
uchar x29_prio;
|
|
|
|
};
|
|
|
|
|
2022-10-09 05:37:23 +00:00
|
|
|
CAudioSys(uchar, uchar, uchar, uchar, uint);
|
2022-10-01 06:19:09 +00:00
|
|
|
~CAudioSys();
|
2022-09-13 04:26:54 +00:00
|
|
|
|
2022-10-09 05:37:23 +00:00
|
|
|
static void SysSetVolume(uchar, uint, uchar);
|
2022-10-31 16:19:28 +00:00
|
|
|
static void SysSetSfxVolume(uchar, ushort, uchar, uchar);
|
|
|
|
|
2022-10-09 05:37:23 +00:00
|
|
|
static void SetDefaultVolumeScale(short);
|
|
|
|
static void SetVolumeScale(short);
|
2022-10-31 16:19:28 +00:00
|
|
|
static void SetSurroundMode(ESurroundModes);
|
2022-09-13 04:26:54 +00:00
|
|
|
static void TrkSetSampleRate(ETRKSampleRate);
|
|
|
|
|
2022-10-09 05:37:23 +00:00
|
|
|
static short GetDefaultVolumeScale();
|
2022-09-13 04:26:54 +00:00
|
|
|
|
2022-10-09 05:37:23 +00:00
|
|
|
static const uchar kMaxVolume;
|
2022-08-13 01:26:00 +00:00
|
|
|
};
|
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
#endif // _CAUDIOSYS
|