hoa_audio::private_audio::MusicData Class Reference

An internal class used to manage music data information. More...

#include <audio_music.h>

Collaboration diagram for hoa_audio::private_audio::MusicData:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void DEBUG_PrintProperties ()
 Displays the properties of the buffered data to standard output.
bool IsValid ()
 Returns true if all OpenAL buffers are valid.
 MusicData (const std::string &fname)
void RemoveReference ()
 Removes a single reference to this buffer. If the reference count becomes zero, the buffer is destroyed.
 ~MusicData ()

Public Attributes

std::string filename
 The filename of the audio data the buffer holds.
Mix_Music * music
 A pointer to the chunk of sound data loaded in memory.
bool playing
 Is this piece of music currently playing.
uint8 reference_count
 The number of MusicDescriptor objects that refer to this MusicData object.

Detailed Description

An internal class used to manage music data information.

***************************************************************************

This class manages information about music data loaded into the application. Objects of this class are managed internally by the audio engine and are never referred to by the user.

Definition at line 39 of file audio_music.h.


Constructor & Destructor Documentation

hoa_audio::private_audio::MusicData::MusicData ( const std::string &  fname  ) 

Definition at line 29 of file audio_music.cpp.

References filename, music, and reference_count.

hoa_audio::private_audio::MusicData::~MusicData (  ) 

Definition at line 44 of file audio_music.cpp.

References hoa_audio::AUDIO_DEBUG, music, and reference_count.


Member Function Documentation

void hoa_audio::private_audio::MusicData::DEBUG_PrintProperties (  ) 

Displays the properties of the buffered data to standard output.

Definition at line 72 of file audio_music.cpp.

References hoa_audio::GameAudio::_audio_errors, hoa_audio::AUDIO_ERROR_NO_DATA, hoa_audio::AudioManager, filename, and IsValid().

Referenced by hoa_audio::MusicDescriptor::DEBUG_dataProperties().

Here is the call graph for this function:

bool hoa_audio::private_audio::MusicData::IsValid (  ) 

Returns true if all OpenAL buffers are valid.

Definition at line 54 of file audio_music.cpp.

References music, and reference_count.

Referenced by DEBUG_PrintProperties().

void hoa_audio::private_audio::MusicData::RemoveReference (  ) 

Removes a single reference to this buffer. If the reference count becomes zero, the buffer is destroyed.

Definition at line 63 of file audio_music.cpp.

References reference_count.

Referenced by hoa_audio::MusicDescriptor::FreeMusic(), hoa_audio::MusicDescriptor::LoadMusic(), and hoa_audio::MusicDescriptor::~MusicDescriptor().


Member Data Documentation

std::string hoa_audio::private_audio::MusicData::filename

The filename of the audio data the buffer holds.

Definition at line 45 of file audio_music.h.

Referenced by DEBUG_PrintProperties(), hoa_audio::MusicDescriptor::GetFilename(), and MusicData().

Mix_Music* hoa_audio::private_audio::MusicData::music

A pointer to the chunk of sound data loaded in memory.

Definition at line 49 of file audio_music.h.

Referenced by IsValid(), MusicData(), hoa_audio::MusicDescriptor::PlayMusic(), and ~MusicData().

bool hoa_audio::private_audio::MusicData::playing

Is this piece of music currently playing.

Definition at line 51 of file audio_music.h.

Referenced by hoa_audio::MusicDescriptor::IsPlaying(), hoa_audio::MusicDescriptor::PauseMusic(), hoa_audio::MusicDescriptor::PlayMusic(), hoa_audio::MusicDescriptor::ResumeMusic(), and hoa_audio::MusicDescriptor::StopMusic().

uint8 hoa_audio::private_audio::MusicData::reference_count

The number of MusicDescriptor objects that refer to this MusicData object.

Definition at line 47 of file audio_music.h.

Referenced by IsValid(), MusicData(), RemoveReference(), and ~MusicData().


The documentation for this class was generated from the following files:
Generated on Fri Jul 6 23:12:37 2007 for Hero of Allacrost by  doxygen 1.5.1