#include <audio_sound.h>
Collaboration diagram for hoa_audio::SoundDescriptor:

Public Member Functions | ||||
| void | DEBUG_DataProperties () | |||
| Displays the properties of the sound descriptor's buffer. | ||||
| void | FreeSound () | |||
| Removes a reference to the sound data. | ||||
| const std::string & | GetFilename () | |||
| Returns a const reference to the filename of the buffer that the source points to. | ||||
| uint8 | GetSoundState () | |||
| Retrieves the state of the sound. | ||||
| bool | LoadSound (std::string fname) | |||
| Loads new sound data from a file. | ||||
| SoundDescriptor () | ||||
| ~SoundDescriptor () | ||||
Retreive Sound Playback Properties Functions | ||||
| ||||
| uint32 | GetFadeInTime () | |||
| uint32 | GetFadeOutTime () | |||
| int32 | GetLoopCount () | |||
| int32 | GetPlayTimeout () | |||
Standard Sound Operations | ||||
The basic functions that can change the state of sound playback.
| ||||
| void | PauseSound () | |||
| void | PlaySound () | |||
| void | ResumeSound () | |||
| void | StopSound () | |||
Set Sound Playback Properties Functions | ||||
| ||||
| void | SetFadeInTime (uint32 fade_time) | |||
| void | SetFadeOutTime (uint32 fade_time) | |||
| void | SetLoopCount (int32 loops) | |||
| void | SetPlayTimeout (uint32 timeout) | |||
Private Attributes | ||||
| int32 | _channel | |||
| The audio channel that the sound is playing on This member is needed to perform specific queries on the playing channel. | ||||
| private_audio::SoundData * | _data | |||
| A pointer to the sound data that is used. | ||||
| uint32 | _fade_in_time | |||
| The number of milliseconds to fade in the sound when playing begins A value of zero means that no fade in is done (this is the default). | ||||
| uint32 | _fade_out_time | |||
| The number of milliseconds to fade out the sound when the sound is stopped A value of zero means that no fade out is done (this is the default). | ||||
| int32 | _loop_count | |||
The number of loops to play the sound for By default this member is set to zero, meaning it plays only once.
| ||||
| int32 | _play_timeout | |||
| The number of milliseconds to play a sound before timing out and stopping the sound A value of -1 indicates no time out occurs (this is the default). | ||||
Friends | ||||
| class | GameAudio | |||
****************************************************************************
The purpose of this class is to provide the API user with an easy-to-use interface for manipulating sound data.This class holds all the properties about a given sound. Including its location, velocity, whether or not it loops, and numerous other properties.
Definition at line 69 of file audio_sound.h.
| hoa_audio::SoundDescriptor::SoundDescriptor | ( | ) |
Definition at line 98 of file audio_sound.cpp.
References _data, _fade_in_time, _fade_out_time, _loop_count, and _play_timeout.
| hoa_audio::SoundDescriptor::~SoundDescriptor | ( | ) |
Definition at line 108 of file audio_sound.cpp.
References _data, and hoa_audio::private_audio::SoundData::RemoveReference().
Here is the call graph for this function:

| void hoa_audio::SoundDescriptor::DEBUG_DataProperties | ( | ) | [inline] |
Displays the properties of the sound descriptor's buffer.
Definition at line 137 of file audio_sound.h.
References _data, and hoa_audio::private_audio::SoundData::DEBUG_PrintProperties().
Here is the call graph for this function:

| void hoa_audio::SoundDescriptor::FreeSound | ( | ) |
Removes a reference to the sound data.
Definition at line 132 of file audio_sound.cpp.
References _data, and hoa_audio::private_audio::SoundData::RemoveReference().
Here is the call graph for this function:

| uint32 hoa_audio::SoundDescriptor::GetFadeInTime | ( | ) | [inline] |
| uint32 hoa_audio::SoundDescriptor::GetFadeOutTime | ( | ) | [inline] |
| const std::string& hoa_audio::SoundDescriptor::GetFilename | ( | ) | [inline] |
Returns a const reference to the filename of the buffer that the source points to.
Definition at line 76 of file audio_sound.h.
References _data, and hoa_audio::private_audio::SoundData::filename.
| int32 hoa_audio::SoundDescriptor::GetLoopCount | ( | ) | [inline] |
| int32 hoa_audio::SoundDescriptor::GetPlayTimeout | ( | ) | [inline] |
| uint8 hoa_audio::SoundDescriptor::GetSoundState | ( | ) |
Retrieves the state of the sound.
Definition at line 141 of file audio_sound.cpp.
References _channel, _data, hoa_audio::AUDIO_STATE_FADING_IN, hoa_audio::AUDIO_STATE_FADING_OUT, hoa_audio::AUDIO_STATE_PAUSED, hoa_audio::AUDIO_STATE_PLAYING, hoa_audio::AUDIO_STATE_STOPPED, hoa_audio::AUDIO_STATE_UNLOADED, and hoa_audio::private_audio::SoundData::sound.
| bool hoa_audio::SoundDescriptor::LoadSound | ( | std::string | fname | ) |
Loads new sound data from a file.
| fname | The name of the file, without path information or a file extension. |
| void hoa_audio::SoundDescriptor::PauseSound | ( | ) |
Definition at line 191 of file audio_sound.cpp.
References hoa_audio::GameAudio::_audio_errors, _channel, _data, hoa_audio::AUDIO_ERROR_NO_DATA, and hoa_audio::AudioManager.
| void hoa_audio::SoundDescriptor::PlaySound | ( | ) |
Definition at line 172 of file audio_sound.cpp.
References hoa_audio::GameAudio::_audio_errors, _channel, _data, _fade_in_time, _loop_count, _play_timeout, hoa_audio::private_audio::ANY_CHANNEL, hoa_audio::AUDIO_ERROR_NO_DATA, hoa_audio::AUDIO_ERROR_PLAY_FAILURE, hoa_audio::AudioManager, and hoa_audio::private_audio::SoundData::sound.
| void hoa_audio::SoundDescriptor::ResumeSound | ( | ) |
Definition at line 201 of file audio_sound.cpp.
References hoa_audio::GameAudio::_audio_errors, _channel, _data, hoa_audio::AUDIO_ERROR_NO_DATA, and hoa_audio::AudioManager.
| void hoa_audio::SoundDescriptor::SetFadeInTime | ( | uint32 | fade_time | ) | [inline] |
| void hoa_audio::SoundDescriptor::SetFadeOutTime | ( | uint32 | fade_time | ) | [inline] |
| void hoa_audio::SoundDescriptor::SetLoopCount | ( | int32 | loops | ) | [inline] |
| void hoa_audio::SoundDescriptor::SetPlayTimeout | ( | uint32 | timeout | ) | [inline] |
| void hoa_audio::SoundDescriptor::StopSound | ( | ) |
Definition at line 211 of file audio_sound.cpp.
References hoa_audio::GameAudio::_audio_errors, _channel, _data, _fade_out_time, hoa_audio::AUDIO_ERROR_NO_DATA, and hoa_audio::AudioManager.
friend class GameAudio [friend] |
Definition at line 70 of file audio_sound.h.
int32 hoa_audio::SoundDescriptor::_channel [private] |
The audio channel that the sound is playing on This member is needed to perform specific queries on the playing channel.
Definition at line 148 of file audio_sound.h.
Referenced by GetSoundState(), PauseSound(), PlaySound(), ResumeSound(), and StopSound().
A pointer to the sound data that is used.
Definition at line 141 of file audio_sound.h.
Referenced by DEBUG_DataProperties(), FreeSound(), GetFilename(), GetSoundState(), PauseSound(), PlaySound(), ResumeSound(), SoundDescriptor(), StopSound(), and ~SoundDescriptor().
The number of milliseconds to fade in the sound when playing begins A value of zero means that no fade in is done (this is the default).
Definition at line 158 of file audio_sound.h.
Referenced by GetFadeInTime(), PlaySound(), SetFadeInTime(), and SoundDescriptor().
The number of milliseconds to fade out the sound when the sound is stopped A value of zero means that no fade out is done (this is the default).
Definition at line 162 of file audio_sound.h.
Referenced by GetFadeOutTime(), SetFadeOutTime(), SoundDescriptor(), and StopSound().
int32 hoa_audio::SoundDescriptor::_loop_count [private] |
The number of loops to play the sound for By default this member is set to zero, meaning it plays only once.
Definition at line 154 of file audio_sound.h.
Referenced by GetLoopCount(), PlaySound(), SetLoopCount(), and SoundDescriptor().
The number of milliseconds to play a sound before timing out and stopping the sound A value of -1 indicates no time out occurs (this is the default).
Definition at line 166 of file audio_sound.h.
Referenced by GetPlayTimeout(), PlaySound(), SetPlayTimeout(), and SoundDescriptor().
1.5.1