prime/include/Kyoto/Audio/CSfxManager.hpp
Henrique Gemignani Passos Lima 18de83f2e4 Match but don't link CAudioStateWin
Former-commit-id: 2313ccfa1d6eaf19aade81fc58b6f8887f5f3b76
2022-10-14 02:31:53 +03:00

44 lines
1.6 KiB
C++

#ifndef _CSFXMANAGER
#define _CSFXMANAGER
#include "types.h"
#include "Kyoto/Audio/CSfxHandle.hpp"
class CVector3f;
class CSfxManager {
public:
enum ESfxChannels { kSC_Invalid = -1, kSC_Default = 0, kSC_Game, kSC_PauseScreen };
static void Update(float dt);
static void RemoveEmitter(CSfxHandle handle);
static void UpdateEmitter(CSfxHandle handle, const CVector3f& pos, const CVector3f& dir,
uchar maxVol);
static const short kMaxPriority; // 0xFF
static const short kMedPriority; // 0x7F
static const ushort kInternalInvalidSfxId; // 0xFFFF
static const int kAllAreas; // 0xFFFFFFFF
static CSfxHandle AddEmitter(ushort id, const CVector3f& pos, const CVector3f& dir,
bool useAcoustics, bool looped, short prio = kMedPriority,
int areaId = kAllAreas);
static CSfxHandle AddEmitter(ushort id, const CVector3f& pos, const CVector3f& dir, uchar vol,
bool useAcoustics, bool looped, short prio = kMedPriority,
int areaId = kAllAreas);
static void Shutdown();
static ushort TranslateSFXID(ushort);
static void PitchBend(CSfxHandle handle, int pitch);
static CSfxHandle SfxStart(ushort id, uchar vol, uchar pan, bool useAcoustics, short prio,
bool looped, int areaId);
static bool IsPlaying(const CSfxHandle& handle);
static void SetChannel(ESfxChannels);
static void KillAll(ESfxChannels);
static void TurnOnChannel(ESfxChannels);
static void TurnOffChannel(ESfxChannels);
};
#endif // _CSFXMANAGER