1 #ifndef GAME_SOUND_OPENAL_OUTPUT_H
2 #define GAME_SOUND_OPENAL_OUTPUT_H
24 typedef std::deque<ALuint>
IDDq;
27 typedef std::vector<MWBase::SoundPtr>
SoundVec;
29 typedef std::vector<MWBase::SoundStreamPtr>
StreamVec;
38 void initCommon2D(ALuint source,
const osg::Vec3f &pos, ALfloat gain, ALfloat pitch,
bool loop,
bool useenv);
39 void initCommon3D(ALuint source,
const osg::Vec3f &pos, ALfloat mindist, ALfloat maxdist, ALfloat gain, ALfloat pitch,
bool loop,
bool useenv);
41 void updateCommon(ALuint source,
const osg::Vec3f &pos, ALfloat maxdist, ALfloat gain, ALfloat pitch,
bool useenv,
bool is3d);
47 virtual std::vector<std::string>
enumerate();
48 virtual void init(
const std::string &devname=std::string());
52 virtual void enableHrtf(
const std::string &hrtfname,
bool auto_enable);
85 #ifndef DEFAULT_OUTPUT
86 #define DEFAULT_OUTPUT(x) ::MWSound::OpenAL_Output((x))
virtual void streamSound3D(DecoderPtr decoder, MWBase::SoundStreamPtr sound, bool getLoudnessData)
Definition: openal_output.cpp:974
void * Sound_Handle
Definition: sound_output.hpp:14
Definition: openal_output.hpp:19
osg::Vec3f mListenerPos
Definition: openal_output.hpp:32
virtual void init(const std::string &devname=std::string())
Definition: openal_output.cpp:515
Environment mListenerEnv
Definition: openal_output.hpp:33
OpenAL_Output(const OpenAL_Output &rhs)
std::auto_ptr< StreamThread > mStreamThread
Definition: openal_output.hpp:35
virtual std::vector< std::string > enumerate()
Definition: openal_output.cpp:498
std::vector< MWBase::SoundPtr > SoundVec
Definition: openal_output.hpp:27
ALCdevice * mDevice
Definition: openal_output.hpp:21
virtual void unloadSound(Sound_Handle data)
Definition: openal_output.cpp:745
virtual ~OpenAL_Output()
Definition: openal_output.cpp:1155
virtual void finishSound(MWBase::SoundPtr sound)
Definition: openal_output.cpp:905
virtual size_t getSoundDataSize(Sound_Handle data) const
Definition: openal_output.cpp:767
void initCommon3D(ALuint source, const osg::Vec3f &pos, ALfloat mindist, ALfloat maxdist, ALfloat gain, ALfloat pitch, bool loop, bool useenv)
Definition: openal_output.cpp:800
std::vector< MWBase::SoundStreamPtr > StreamVec
Definition: openal_output.hpp:29
virtual void updateSound(MWBase::SoundPtr sound)
Definition: openal_output.cpp:933
ALCcontext * mContext
Definition: openal_output.hpp:22
virtual void finishUpdate()
Definition: openal_output.cpp:1073
virtual void enableHrtf(const std::string &hrtfname, bool auto_enable)
Definition: openal_output.cpp:621
virtual float getStreamLoudness(MWBase::SoundStreamPtr sound)
Definition: openal_output.cpp:1041
virtual void resumeSounds(int types)
Definition: openal_output.cpp:1122
virtual void pauseSounds(int types)
Definition: openal_output.cpp:1097
boost::shared_ptr< Sound_Decoder > DecoderPtr
Definition: soundmanager.hpp:19
virtual void startUpdate()
Definition: openal_output.cpp:1068
virtual void updateStream(MWBase::SoundStreamPtr sound)
Definition: openal_output.cpp:1057
IDDq mFreeSources
Definition: openal_output.hpp:25
virtual bool isSoundPlaying(MWBase::SoundPtr sound)
Definition: openal_output.cpp:921
virtual void streamSound(DecoderPtr decoder, MWBase::SoundStreamPtr sound)
Definition: openal_output.cpp:943
Definition: openal_output.cpp:250
virtual void deinit()
Definition: openal_output.cpp:577
boost::shared_ptr< MWSound::Stream > SoundStreamPtr
Definition: soundmanager.hpp:26
void initCommon2D(ALuint source, const osg::Vec3f &pos, ALfloat gain, ALfloat pitch, bool loop, bool useenv)
Definition: openal_output.cpp:779
virtual double getStreamDelay(MWBase::SoundStreamPtr sound)
Definition: openal_output.cpp:1026
virtual void disableHrtf()
Definition: openal_output.cpp:676
StreamVec mActiveStreams
Definition: openal_output.hpp:30
virtual double getStreamOffset(MWBase::SoundStreamPtr sound)
Definition: openal_output.cpp:1033
virtual void updateListener(const osg::Vec3f &pos, const osg::Vec3f &atdir, const osg::Vec3f &updir, Environment env)
Definition: openal_output.cpp:1079
SoundVec mActiveSounds
Definition: openal_output.hpp:28
Definition: soundmanagerimp.hpp:45
Definition: sound_output.hpp:21
void updateCommon(ALuint source, const osg::Vec3f &pos, ALfloat maxdist, ALfloat gain, ALfloat pitch, bool useenv, bool is3d)
Definition: openal_output.cpp:823
virtual bool isStreamPlaying(MWBase::SoundStreamPtr sound)
Definition: openal_output.cpp:1049
virtual void playSound(MWBase::SoundPtr sound, Sound_Handle data, float offset)
Definition: openal_output.cpp:844
virtual void playSound3D(MWBase::SoundPtr sound, Sound_Handle data, float offset)
Definition: openal_output.cpp:874
std::deque< ALuint > IDDq
Definition: openal_output.hpp:24
virtual std::vector< std::string > enumerateHrtf()
Definition: openal_output.cpp:597
virtual void finishStream(MWBase::SoundStreamPtr sound)
Definition: openal_output.cpp:1005
virtual Sound_Handle loadSound(const std::string &fname)
Definition: openal_output.cpp:702
boost::shared_ptr< MWSound::Sound > SoundPtr
Definition: soundmanager.hpp:25
Environment
Definition: soundmanagerimp.hpp:35
OpenAL_Output & operator=(const OpenAL_Output &rhs)