22 #ifndef FIFE_SOUNDMANAGER_H
23 #define FIFE_SOUNDMANAGER_H
35 #include "fife_openal.h"
56 SoundEmitter* getEmitter(uint32_t emitterid)
const;
60 SoundEmitter* createEmitter();
64 void releaseEmitter(uint32_t emitterid);
68 ALCcontext* getContext()
const {
76 void setVolume(
float vol) {
77 if (m_device == NULL) {
80 alListenerf(AL_GAIN, vol);
85 float getVolume()
const{
92 alGetListenerf(AL_GAIN, &m_mutevol);
93 alListenerf(AL_GAIN, 0);
99 alListenerf(AL_GAIN, m_mutevol);
104 void setListenerPosition(
float x,
float y,
float z) {
105 alListener3f(AL_POSITION, x, y, z);
110 void setListenerOrientation(
float x,
float y,
float z) {
111 ALfloat vec[6] = { x, y, z, 0.0, 0.0, 1.0};
112 alListenerfv(AL_ORIENTATION, vec);
117 void setListenerVelocity(
float x,
float y,
float z);
121 bool isActive()
const{
122 return m_device != NULL;
127 std::vector<SoundEmitter*> m_emittervec;
128 ALCcontext* m_context;