28#ifndef HPL_LOWLEVELSOUND_H
29#define HPL_LOWLEVELSOUND_H
31#include "hpl1/engine/math/MathTypes.h"
32#include "hpl1/engine/system/SystemTypes.h"
34#include "hpl1/engine/system/low_level_system.h"
39class iSoundEnvironment;
57 const tString &asType,
bool abStream,
bool abLoopStream) = 0;
59 virtual void UpdateSound(
float afTimeStep) = 0;
63 virtual void SetListenerPosition(
const cVector3f &avPos) = 0;
64 const cMatrixf &GetListenerMatrix() {
return m_mtxListener; }
66 virtual void SetListenerAttenuation(
bool abEnabled) = 0;
68 virtual void SetSetRolloffFactor(
float afFactor) = 0;
70 virtual void SetVolume(
float afVolume) = 0;
72 cVector3f &GetListenerPosition() {
return mvListenerPosition; }
73 cVector3f &GetListenerVelocity() {
return mvListenerVelocity; }
74 cVector3f &GetListenerForward() {
return mvListenerForward; }
75 cVector3f &GetListenerUp() {
return mvListenerUp; }
76 bool GetListenerAttenuation() {
return mbListenerAttenuation; }
78 float GetVolume() {
return mfVolume; }
81 virtual void Init(
bool abUseHardware,
bool abForceGeneric,
bool abUseEnvAudio,
int alMaxChannels,
82 int alStreamUpdateFreq,
bool abUseThreading,
bool abUseVoiceManagement,
83 int alMaxMonoSourceHint,
int alMaxStereoSourceHint,
84 int alStreamingBufferSize,
int alStreamingBufferCount,
bool abEnableLowLevelLog, tString asDeviceName) = 0;
86 bool IsHardwareAccelerated() {
return mbHardwareAcc; }
87 bool IsEnvAudioAvailable() {
return mbEnvAudioEnabled; }
89 virtual void SetEnvVolume(
float afVolume) = 0;
90 float GetEnvVolume() {
return mfEnvVolume; }
92 virtual iSoundEnvironment *LoadSoundEnvironment(
const tString &asFilePath) = 0;
94 virtual void SetSoundEnvironment(iSoundEnvironment *apSoundEnv) = 0;
95 virtual void FadeSoundEnvironment(iSoundEnvironment *apSourceSoundEnv, iSoundEnvironment *apDestSoundEnv,
float afT) = 0;
97 iSoundEnvironment *GetSoundEnvironmentFromFileName(
const tString &asName);
103 bool mbListenerAttenuation;
106 bool mbEnvAudioEnabled;
108 cVector3f mvListenerUp;
109 cVector3f mvListenerForward;
110 cVector3f mvListenerRight;
111 cVector3f mvListenerPosition;
112 cVector3f mvListenerVelocity;
114 cMatrixf m_mtxListener;
116 tSoundEnvList mlstSoundEnv;
ListInternal::Iterator< iSoundEnvironment * > iterator
Definition: list.h:52
Definition: LowLevelSound.h:45
virtual void GetSupportedFormats(tStringList &alstFormats)=0
Definition: SoundData.h:39