AudioServer Class Reference
[Framework Module]

#include <audioserver.h>

Inheritance diagram for AudioServer:

RootServer< AudioServer > Root Server< AudioServer > Object TreeNode< Root > Referenced Counted Serialized List< Root > ListNode< Root > OpenALAudioServer

List of all members.

Detailed Description

Audio subsystem 3 server.

Public Types

enum  DistanceModel {

Public Member Functions

 AudioServer (const char *id)
virtual ~AudioServer ()
virtual SoundNewSound (const string &file_name)
virtual SoundResourceNewSoundResource (const string &file_name)
AudioFileNewAudioFile (const string &file_name, bool open=false, bool write=false)
void SetDeviceName (const string &name)
const string & GetDeviceName ()
const vector< string > & GetDeviceList ()
virtual bool OpenDevice ()
virtual void CloseDevice ()
virtual void WriteInfo ()
virtual bool Trigger ()
void PlaySound (Sound *snd)
void StopSound (Sound *snd)
void PauseSound (Sound *snd)
void PlayPauseSound (Sound *snd)
void StopAllSounds ()
void UpdateSound (Sound *snd)
void UpdateStream (Sound *snd)
void UpdateAllSounds ()
void UpdateAllStreams ()
void UpdateListener ()
void SetListener (Listener *l)
void SetDistanceModel (DistanceModel model)
void SetMasterVolume (float volume)
void SetCategoryVolume (Sound::Category category, float volume)
void SetCategoryAllowed (Sound::Category category, bool allowed)
void SetDopplerFactor (float v)
void SetSpeedOfSound (float v)
AudioServer::DistanceModel GetDistanceModel ()
float GetMasterVolume ()
float GetCategoryVolume (Sound::Category category)
bool GetCategoryAllowed (Sound::Category category)
float GetDopplerFactor () const
float GetSpeedOfSound () const
void Mute ()
void Unmute ()
bool IsMuted ()
bool IsDeviceOpened ()
bool IsVolumeDirty ()

Static Public Member Functions

static bool DistanceModelToString (DistanceModel model, string &name)
static bool StringToDistanceModel (const string &name, DistanceModel &model)

Protected Attributes

bool muted
bool device_opened
string device_name
float master_volume
float category_volume [Sound::SND_COUNT]
bool category_allowed [Sound::SND_COUNT]
DistanceModel distance_model
float doppler_factor
float speed_of_sound
bool volume_dirty
bool props_dirty
Ref< ResourceServerresource_server
Ref< Rootsounds_list
vector< string > device_list

Member Enumeration Documentation

enum AudioServer::DistanceModel


Constructor & Destructor Documentation

AudioServer::AudioServer ( const char *  id  ) 


AudioServer::~AudioServer (  )  [virtual]


Member Function Documentation

Sound * AudioServer::NewSound ( const string &  file_name  )  [virtual]

Creates a non-shared sound object.

Reimplemented in OpenALAudioServer.

SoundResource * AudioServer::NewSoundResource ( const string &  file_name  )  [virtual]

Creates a shared sound resource object.

Reimplemented in OpenALAudioServer.

AudioFile * AudioServer::NewAudioFile ( const string &  file_name,
bool  open = false,
bool  write = false 

void AudioServer::SetDeviceName ( const string &  name  )  [inline]

const string & AudioServer::GetDeviceName (  )  [inline]

const vector< string > & AudioServer::GetDeviceList (  )  [inline]

bool AudioServer::OpenDevice (  )  [virtual]

Opens the audio device.

Reimplemented in OpenALAudioServer.

void AudioServer::CloseDevice (  )  [virtual]

Close the audio device.

Reimplemented in OpenALAudioServer.

void AudioServer::WriteInfo (  )  [virtual]

Writes basic audio information to log file.

Reimplemented in OpenALAudioServer.

bool AudioServer::Trigger (  )  [virtual]

Reimplemented from Server< AudioServer >.

Reimplemented in OpenALAudioServer.

void AudioServer::PlaySound ( Sound snd  )  [inline]

Starts a sound.

void AudioServer::StopSound ( Sound snd  )  [inline]

Stops a sound.

void AudioServer::PauseSound ( Sound snd  )  [inline]

Pause a sound.

void AudioServer::PlayPauseSound ( Sound snd  )  [inline]

void AudioServer::StopAllSounds (  )  [inline]

Stops all sounds.

void AudioServer::UpdateSound ( Sound snd  )  [inline]

Updates a sound.

void AudioServer::UpdateStream ( Sound snd  )  [inline]

void AudioServer::UpdateAllSounds (  )  [inline]

Calls Update() on all playing sounds. This can be used to immediately commit changed without having to wait until Trigger().

void AudioServer::UpdateAllStreams (  )  [inline]

void AudioServer::UpdateListener (  )  [inline]

Updates listener attributes.

void AudioServer::SetListener ( Listener l  )  [inline]

Sets currnet listener.

void AudioServer::SetDistanceModel ( DistanceModel  model  )  [inline]

void AudioServer::SetMasterVolume ( float  volume  )  [inline]

Sets the master volume.

void AudioServer::SetCategoryVolume ( Sound::Category  category,
float  volume 
) [inline]

Sets the category volume (0.0 .. 1.0).

void AudioServer::SetCategoryAllowed ( Sound::Category  category,
bool  allowed 

Sets whether sounds from category can be played.

void AudioServer::SetDopplerFactor ( float  v  )  [inline]

void AudioServer::SetSpeedOfSound ( float  v  )  [inline]

AudioServer::DistanceModel AudioServer::GetDistanceModel (  )  [inline]

float AudioServer::GetMasterVolume (  )  [inline]

Gets the master volume.

float AudioServer::GetCategoryVolume ( Sound::Category  category  )  [inline]

Gets the category volume.

bool AudioServer::GetCategoryAllowed ( Sound::Category  category  )  [inline]

Gets whether sounds from category can be played.

float AudioServer::GetDopplerFactor (  )  const [inline]

float AudioServer::GetSpeedOfSound (  )  const [inline]

void AudioServer::Mute (  ) 

Mute all cateory volumes.

void AudioServer::Unmute (  ) 

Restores all muted cateory volumes.

bool AudioServer::IsMuted (  )  [inline]

Is currently muted?

bool AudioServer::IsDeviceOpened (  )  [inline]

Returns true if currently device_opened.

bool AudioServer::IsVolumeDirty (  )  [inline]

bool AudioServer::DistanceModelToString ( DistanceModel  model,
string &  name 
) [static]

bool AudioServer::StringToDistanceModel ( const string &  name,
DistanceModel model 
) [static]

Member Data Documentation

bool AudioServer::muted [protected]

bool AudioServer::device_opened [protected]

string AudioServer::device_name [protected]

float AudioServer::master_volume [protected]

float AudioServer::category_volume[Sound::SND_COUNT] [protected]

bool AudioServer::category_allowed[Sound::SND_COUNT] [protected]

DistanceModel AudioServer::distance_model [protected]

float AudioServer::doppler_factor [protected]

float AudioServer::speed_of_sound [protected]

bool AudioServer::volume_dirty [protected]

bool AudioServer::props_dirty [protected]

Listener* AudioServer::listener [protected]

Ref<ResourceServer> AudioServer::resource_server [protected]

Ref<Root> AudioServer::sounds_list [protected]

vector<string> AudioServer::device_list [protected]

The documentation for this class was generated from the following files:
Generated on Sat Oct 20 14:47:31 2007 for Dark Oberon by  doxygen 1.5.3