#include <audio_music.h>
Collaboration diagram for hoa_audio::MusicDescriptor:

Public Member Functions | ||||
| void | DEBUG_dataProperties () | |||
| Displays the properties of the music descriptor's buffer. | ||||
| void | FreeMusic () | |||
| Removes a reference to the music data. | ||||
| const std::string & | GetFilename () | |||
| Returns a const reference to the filename of the buffer that the source points to. | ||||
| uint8 | GetMusicState () | |||
| Retrieves the state of the music. | ||||
| bool | IsPlaying () | |||
| Returns true if this piece of music is currently playing. | ||||
| bool | LoadMusic (const std::string &fname) | |||
| Loads the music file from memory. | ||||
| MusicDescriptor () | ||||
| ~MusicDescriptor () | ||||
Standard Music Operations | ||||
The basic functions that can change the state of music playback.
| ||||
| void | PauseMusic () | |||
| void | PlayMusic () | |||
| void | ResumeMusic () | |||
| void | RewindMusic () | |||
| void | SeekMusic (float seconds) | |||
| void | StopMusic () | |||
Set Music Playback Properties Functions | ||||
| ||||
| void | SetFadeInTime (uint32 fade_time) | |||
| void | SetFadeOutTime (uint32 fade_time) | |||
| void | SetLoopCount (int32 loops) | |||
| void | SetPlayTimeout (uint32 timeout) | |||
Private Attributes | ||||
| private_audio::MusicData * | _data | |||
| A pointer to the music 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 -1, meaning it plays indefinitely until it is explicitly stopped.
| ||||
| 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 | |||
Definition at line 64 of file audio_music.h.
| hoa_audio::MusicDescriptor::MusicDescriptor | ( | ) |
Definition at line 99 of file audio_music.cpp.
| hoa_audio::MusicDescriptor::~MusicDescriptor | ( | ) |
Definition at line 109 of file audio_music.cpp.
References _data, and hoa_audio::private_audio::MusicData::RemoveReference().
Here is the call graph for this function:

| void hoa_audio::MusicDescriptor::DEBUG_dataProperties | ( | ) | [inline] |
Displays the properties of the music descriptor's buffer.
Definition at line 120 of file audio_music.h.
References _data, and hoa_audio::private_audio::MusicData::DEBUG_PrintProperties().
Here is the call graph for this function:

| void hoa_audio::MusicDescriptor::FreeMusic | ( | ) |
Removes a reference to the music data.
Definition at line 133 of file audio_music.cpp.
References _data, and hoa_audio::private_audio::MusicData::RemoveReference().
Here is the call graph for this function:

| const std::string& hoa_audio::MusicDescriptor::GetFilename | ( | ) | [inline] |
Returns a const reference to the filename of the buffer that the source points to.
Definition at line 71 of file audio_music.h.
References _data, and hoa_audio::private_audio::MusicData::filename.
Referenced by hoa_battle::BattleMode::Reset().
| uint8 hoa_audio::MusicDescriptor::GetMusicState | ( | ) |
Retrieves the state of the music.
Definition at line 214 of file audio_music.cpp.
References _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, and hoa_audio::AUDIO_STATE_UNLOADED.
Referenced by PlayMusic().
| bool hoa_audio::MusicDescriptor::IsPlaying | ( | ) |
Returns true if this piece of music is currently playing.
Definition at line 240 of file audio_music.cpp.
References _data, and hoa_audio::private_audio::MusicData::playing.
| bool hoa_audio::MusicDescriptor::LoadMusic | ( | const std::string & | fname | ) |
Loads the music file from memory.
| fname | The name of the file to load, without path information or file extension attached. |
Definition at line 117 of file audio_music.cpp.
References hoa_audio::GameAudio::_AcquireMusicData(), _data, hoa_audio::AudioManager, and hoa_audio::private_audio::MusicData::RemoveReference().
Referenced by hoa_battle::BattleMode::Reset().
Here is the call graph for this function:

| void hoa_audio::MusicDescriptor::PauseMusic | ( | ) |
Definition at line 158 of file audio_music.cpp.
References hoa_audio::GameAudio::_audio_errors, _data, hoa_audio::AUDIO_ERROR_NO_DATA, hoa_audio::AudioManager, and hoa_audio::private_audio::MusicData::playing.
| void hoa_audio::MusicDescriptor::PlayMusic | ( | ) |
Definition at line 141 of file audio_music.cpp.
References _data, _fade_in_time, _loop_count, hoa_audio::AUDIO_STATE_STOPPED, hoa_audio::AudioManager, GetMusicState(), hoa_audio::private_audio::MusicData::music, hoa_audio::private_audio::MusicData::playing, and hoa_audio::GameAudio::StopAllMusic().
Here is the call graph for this function:

| void hoa_audio::MusicDescriptor::ResumeMusic | ( | ) |
Definition at line 170 of file audio_music.cpp.
References hoa_audio::GameAudio::_audio_errors, _data, hoa_audio::AUDIO_ERROR_NO_DATA, hoa_audio::AudioManager, and hoa_audio::private_audio::MusicData::playing.
| void hoa_audio::MusicDescriptor::RewindMusic | ( | ) |
Definition at line 194 of file audio_music.cpp.
References hoa_audio::GameAudio::_audio_errors, _data, hoa_audio::AUDIO_ERROR_NO_DATA, and hoa_audio::AudioManager.
| void hoa_audio::MusicDescriptor::SeekMusic | ( | float | seconds | ) |
Definition at line 204 of file audio_music.cpp.
References hoa_audio::GameAudio::_audio_errors, _data, hoa_audio::AUDIO_ERROR_NO_DATA, and hoa_audio::AudioManager.
| void hoa_audio::MusicDescriptor::SetFadeInTime | ( | uint32 | fade_time | ) | [inline] |
| void hoa_audio::MusicDescriptor::SetFadeOutTime | ( | uint32 | fade_time | ) | [inline] |
| void hoa_audio::MusicDescriptor::SetLoopCount | ( | int32 | loops | ) | [inline] |
| void hoa_audio::MusicDescriptor::SetPlayTimeout | ( | uint32 | timeout | ) | [inline] |
| void hoa_audio::MusicDescriptor::StopMusic | ( | ) |
Definition at line 182 of file audio_music.cpp.
References hoa_audio::GameAudio::_audio_errors, _data, _fade_out_time, hoa_audio::AUDIO_ERROR_NO_DATA, hoa_audio::AudioManager, and hoa_audio::private_audio::MusicData::playing.
friend class GameAudio [friend] |
Definition at line 65 of file audio_music.h.
A pointer to the music data that is used.
Definition at line 124 of file audio_music.h.
Referenced by DEBUG_dataProperties(), FreeMusic(), GetFilename(), GetMusicState(), IsPlaying(), LoadMusic(), PauseMusic(), PlayMusic(), ResumeMusic(), RewindMusic(), SeekMusic(), StopMusic(), and ~MusicDescriptor().
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 134 of file audio_music.h.
Referenced by PlayMusic(), and SetFadeInTime().
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 138 of file audio_music.h.
Referenced by SetFadeOutTime(), and StopMusic().
int32 hoa_audio::MusicDescriptor::_loop_count [private] |
The number of loops to play the sound for By default this member is set to -1, meaning it plays indefinitely until it is explicitly stopped.
Definition at line 130 of file audio_music.h.
Referenced by PlayMusic(), and SetLoopCount().
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 142 of file audio_music.h.
Referenced by SetPlayTimeout().
1.5.1