22 #ifndef FIFE_SOUNDMANAGER_H
23 #define FIFE_SOUNDMANAGER_H
35 #include "fife_openal.h"
44 SoundManager(SoundClipPool* pool);
57 SoundEmitter* getEmitter(
unsigned int emitterid)
const;
61 SoundEmitter* createEmitter();
65 void releaseEmitter(
unsigned int emitterid);
69 ALCcontext* getContext()
const {
77 void setVolume(
float vol) {
78 if (m_device == NULL) {
81 alListenerf(AL_GAIN, vol);
86 float getVolume()
const{
93 alGetListenerf(AL_GAIN, &m_mutevol);
94 alListenerf(AL_GAIN, 0);
100 alListenerf(AL_GAIN, m_mutevol);
105 void setListenerPosition(
float x,
float y,
float z) {
106 alListener3f(AL_POSITION, x, y, z);
111 void setListenerOrientation(
float x,
float y,
float z) {
112 ALfloat vec[6] = { x, y, z, 0.0, 0.0, 1.0};
113 alListenerfv(AL_ORIENTATION, vec);
118 void setListenerVelocity(
float x,
float y,
float z);
122 bool isActive()
const{
123 return m_device != NULL;
128 std::vector<SoundEmitter*> m_emittervec;
129 ALCcontext* m_context;
131 SoundClipPool* m_pool;