OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
MWSound::OpenAL_Output Class Reference

#include <openal_output.hpp>

Inheritance diagram for MWSound::OpenAL_Output:
Collaboration diagram for MWSound::OpenAL_Output:

Classes

struct  StreamThread
 

Public Member Functions

virtual std::vector< std::string > enumerate ()
 
virtual void init (const std::string &devname=std::string())
 
virtual void deinit ()
 
virtual std::vector< std::string > enumerateHrtf ()
 
virtual void enableHrtf (const std::string &hrtfname, bool auto_enable)
 
virtual void disableHrtf ()
 
virtual Sound_Handle loadSound (const std::string &fname)
 
virtual void unloadSound (Sound_Handle data)
 
virtual size_t getSoundDataSize (Sound_Handle data) const
 
virtual void playSound (MWBase::SoundPtr sound, Sound_Handle data, float offset)
 
virtual void playSound3D (MWBase::SoundPtr sound, Sound_Handle data, float offset)
 
virtual void finishSound (MWBase::SoundPtr sound)
 
virtual bool isSoundPlaying (MWBase::SoundPtr sound)
 
virtual void updateSound (MWBase::SoundPtr sound)
 
virtual void streamSound (DecoderPtr decoder, MWBase::SoundStreamPtr sound)
 
virtual void streamSound3D (DecoderPtr decoder, MWBase::SoundStreamPtr sound, bool getLoudnessData)
 
virtual void finishStream (MWBase::SoundStreamPtr sound)
 
virtual double getStreamDelay (MWBase::SoundStreamPtr sound)
 
virtual double getStreamOffset (MWBase::SoundStreamPtr sound)
 
virtual float getStreamLoudness (MWBase::SoundStreamPtr sound)
 
virtual bool isStreamPlaying (MWBase::SoundStreamPtr sound)
 
virtual void updateStream (MWBase::SoundStreamPtr sound)
 
virtual void startUpdate ()
 
virtual void finishUpdate ()
 
virtual void updateListener (const osg::Vec3f &pos, const osg::Vec3f &atdir, const osg::Vec3f &updir, Environment env)
 
virtual void pauseSounds (int types)
 
virtual void resumeSounds (int types)
 
 OpenAL_Output (SoundManager &mgr)
 
virtual ~OpenAL_Output ()
 
- Public Member Functions inherited from MWSound::Sound_Output
virtual ~Sound_Output ()
 
bool isInitialized () const
 

Private Types

typedef std::deque< ALuint > IDDq
 
typedef std::vector
< MWBase::SoundPtr
SoundVec
 
typedef std::vector
< MWBase::SoundStreamPtr
StreamVec
 

Private Member Functions

void initCommon2D (ALuint source, const osg::Vec3f &pos, ALfloat gain, ALfloat pitch, bool loop, bool useenv)
 
void initCommon3D (ALuint source, const osg::Vec3f &pos, ALfloat mindist, ALfloat maxdist, ALfloat gain, ALfloat pitch, bool loop, bool useenv)
 
void updateCommon (ALuint source, const osg::Vec3f &pos, ALfloat maxdist, ALfloat gain, ALfloat pitch, bool useenv, bool is3d)
 
OpenAL_Outputoperator= (const OpenAL_Output &rhs)
 
 OpenAL_Output (const OpenAL_Output &rhs)
 

Private Attributes

ALCdevice * mDevice
 
ALCcontext * mContext
 
IDDq mFreeSources
 
SoundVec mActiveSounds
 
StreamVec mActiveStreams
 
osg::Vec3f mListenerPos
 
Environment mListenerEnv
 
std::auto_ptr< StreamThreadmStreamThread
 

Additional Inherited Members

- Protected Member Functions inherited from MWSound::Sound_Output
 Sound_Output (SoundManager &mgr)
 
- Protected Attributes inherited from MWSound::Sound_Output
bool mInitialized
 

Member Typedef Documentation

typedef std::deque<ALuint> MWSound::OpenAL_Output::IDDq
private
typedef std::vector<MWBase::SoundPtr> MWSound::OpenAL_Output::SoundVec
private

Constructor & Destructor Documentation

MWSound::OpenAL_Output::OpenAL_Output ( const OpenAL_Output rhs)
private
MWSound::OpenAL_Output::OpenAL_Output ( SoundManager mgr)
MWSound::OpenAL_Output::~OpenAL_Output ( )
virtual

Here is the call graph for this function:

Member Function Documentation

void MWSound::OpenAL_Output::deinit ( )
virtual

Implements MWSound::Sound_Output.

Here is the caller graph for this function:

void MWSound::OpenAL_Output::disableHrtf ( )
virtual

Implements MWSound::Sound_Output.

Here is the call graph for this function:

void MWSound::OpenAL_Output::enableHrtf ( const std::string &  hrtfname,
bool  auto_enable 
)
virtual

Implements MWSound::Sound_Output.

Here is the call graph for this function:

std::vector< std::string > MWSound::OpenAL_Output::enumerate ( )
virtual

Implements MWSound::Sound_Output.

std::vector< std::string > MWSound::OpenAL_Output::enumerateHrtf ( )
virtual

Implements MWSound::Sound_Output.

Here is the call graph for this function:

void MWSound::OpenAL_Output::finishSound ( MWBase::SoundPtr  sound)
virtual

Implements MWSound::Sound_Output.

void MWSound::OpenAL_Output::finishStream ( MWBase::SoundStreamPtr  sound)
virtual

Implements MWSound::Sound_Output.

void MWSound::OpenAL_Output::finishUpdate ( )
virtual

Implements MWSound::Sound_Output.

size_t MWSound::OpenAL_Output::getSoundDataSize ( Sound_Handle  data) const
virtual

Implements MWSound::Sound_Output.

Here is the call graph for this function:

double MWSound::OpenAL_Output::getStreamDelay ( MWBase::SoundStreamPtr  sound)
virtual

Implements MWSound::Sound_Output.

Here is the call graph for this function:

float MWSound::OpenAL_Output::getStreamLoudness ( MWBase::SoundStreamPtr  sound)
virtual

Implements MWSound::Sound_Output.

Here is the call graph for this function:

double MWSound::OpenAL_Output::getStreamOffset ( MWBase::SoundStreamPtr  sound)
virtual

Implements MWSound::Sound_Output.

Here is the call graph for this function:

void MWSound::OpenAL_Output::init ( const std::string &  devname = std::string())
virtual

Implements MWSound::Sound_Output.

Here is the call graph for this function:

void MWSound::OpenAL_Output::initCommon2D ( ALuint  source,
const osg::Vec3f &  pos,
ALfloat  gain,
ALfloat  pitch,
bool  loop,
bool  useenv 
)
private

Here is the caller graph for this function:

void MWSound::OpenAL_Output::initCommon3D ( ALuint  source,
const osg::Vec3f &  pos,
ALfloat  mindist,
ALfloat  maxdist,
ALfloat  gain,
ALfloat  pitch,
bool  loop,
bool  useenv 
)
private

Here is the caller graph for this function:

bool MWSound::OpenAL_Output::isSoundPlaying ( MWBase::SoundPtr  sound)
virtual

Implements MWSound::Sound_Output.

Here is the call graph for this function:

bool MWSound::OpenAL_Output::isStreamPlaying ( MWBase::SoundStreamPtr  sound)
virtual

Implements MWSound::Sound_Output.

Here is the call graph for this function:

Sound_Handle MWSound::OpenAL_Output::loadSound ( const std::string &  fname)
virtual

Implements MWSound::Sound_Output.

Here is the call graph for this function:

OpenAL_Output& MWSound::OpenAL_Output::operator= ( const OpenAL_Output rhs)
private
void MWSound::OpenAL_Output::pauseSounds ( int  types)
virtual

Implements MWSound::Sound_Output.

Here is the call graph for this function:

void MWSound::OpenAL_Output::playSound ( MWBase::SoundPtr  sound,
Sound_Handle  data,
float  offset 
)
virtual

Implements MWSound::Sound_Output.

Here is the call graph for this function:

void MWSound::OpenAL_Output::playSound3D ( MWBase::SoundPtr  sound,
Sound_Handle  data,
float  offset 
)
virtual

Implements MWSound::Sound_Output.

Here is the call graph for this function:

void MWSound::OpenAL_Output::resumeSounds ( int  types)
virtual

Implements MWSound::Sound_Output.

Here is the call graph for this function:

void MWSound::OpenAL_Output::startUpdate ( )
virtual

Implements MWSound::Sound_Output.

void MWSound::OpenAL_Output::streamSound ( DecoderPtr  decoder,
MWBase::SoundStreamPtr  sound 
)
virtual

Implements MWSound::Sound_Output.

Here is the call graph for this function:

void MWSound::OpenAL_Output::streamSound3D ( DecoderPtr  decoder,
MWBase::SoundStreamPtr  sound,
bool  getLoudnessData 
)
virtual

Implements MWSound::Sound_Output.

Here is the call graph for this function:

void MWSound::OpenAL_Output::unloadSound ( Sound_Handle  data)
virtual

Implements MWSound::Sound_Output.

void MWSound::OpenAL_Output::updateCommon ( ALuint  source,
const osg::Vec3f &  pos,
ALfloat  maxdist,
ALfloat  gain,
ALfloat  pitch,
bool  useenv,
bool  is3d 
)
private

Here is the caller graph for this function:

void MWSound::OpenAL_Output::updateListener ( const osg::Vec3f &  pos,
const osg::Vec3f &  atdir,
const osg::Vec3f &  updir,
Environment  env 
)
virtual

Implements MWSound::Sound_Output.

Here is the call graph for this function:

void MWSound::OpenAL_Output::updateSound ( MWBase::SoundPtr  sound)
virtual

Implements MWSound::Sound_Output.

Here is the call graph for this function:

void MWSound::OpenAL_Output::updateStream ( MWBase::SoundStreamPtr  sound)
virtual

Implements MWSound::Sound_Output.

Here is the call graph for this function:

Member Data Documentation

SoundVec MWSound::OpenAL_Output::mActiveSounds
private
StreamVec MWSound::OpenAL_Output::mActiveStreams
private
ALCcontext* MWSound::OpenAL_Output::mContext
private
ALCdevice* MWSound::OpenAL_Output::mDevice
private
IDDq MWSound::OpenAL_Output::mFreeSources
private
Environment MWSound::OpenAL_Output::mListenerEnv
private
osg::Vec3f MWSound::OpenAL_Output::mListenerPos
private
std::auto_ptr<StreamThread> MWSound::OpenAL_Output::mStreamThread
private

The documentation for this class was generated from the following files: