#include <audioserver.h>
AudioServer::AudioServer | ( | const char * | id | ) |
Constructor.
AudioServer::~AudioServer | ( | ) | [virtual] |
Destructor.
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] |
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] |
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] |