Audio Namespace Reference

Namespace for audio sample output and management. More...


Classes

struct  _Sample
 Audio struct representing music or sound effect. More...

Typedefs

typedef struct _Sample Sample
typedef std::map
< ustring, Sample
AudioMap
 Typedef'd map for audio samples.
typedef std::map
< int, Mix_Chunk * > 
ChannelMap
 Typedef'd map of sound effects.

Enumerations

enum  EffectChannel { CHANNEL_DIALOGUE = 0, CHANNEL_SCRIPT, CHANNEL_GUI }
 Channels for sound effects.
enum  SampleType { SAMPLE_EFFECT, SAMPLE_MUSIC }
 Types of audio samples.

Functions

bool loadSample (const ustring &path, Sample &sample)
 Load an audio sample from file.
void playEffect (const ustring &id, EffectChannel channel)
 Play a sound effect sample.
void playMusic (const ustring &id)
 Play a music sample.
bool isMusicPlaying ()
 See if music is playing.
void haltMusic ()
 Halt music playback.
void pushAudio (const ustring &id, const Sample &sample)
 Add an audio sample to the internal map.
void popAudio (const ustring &id)
 Remove an audio sample from the internal map.
Audio::SamplequeryAudio (const ustring &id)
 Get an audio sample from the internal map.
void clearAudioStack ()
 Clear the audio stack.

Variables

bool g_Output
 Flag whether or not to output sound.
Mix_Music * g_Music = NULL
 The music currently playing.
bool g_Output
 Flag whether or not to output sound.
static AudioMap g_Audio
 Internal map of audio.
static ChannelMap Channels
 Internal map of sound effects.
Mix_Music * g_Music
 The music currently playing.


Detailed Description

Namespace for audio sample output and management.

Function Documentation

bool Audio::isMusicPlaying (  ) 

See if music is playing.

Returns:
true if music is playing, false otherwise

bool Audio::loadSample ( const ustring &  path,
Sample &  sample 
)

Load an audio sample from file.

Parameters:
path The path to the audio sample
sample The audio sample object to load the data into
Returns:
true if there were no errors, false otherwise

void Audio::playEffect ( const ustring &  id,
EffectChannel  channel 
)

Play a sound effect sample.

Parameters:
id The ID of the sample
channel The channel to play the sound effect on

void Audio::playMusic ( const ustring &  id  ) 

Play a music sample.

Parameters:
id The ID of the sample

void Audio::popAudio ( const ustring &  id  ) 

Remove an audio sample from the internal map.

Parameters:
id The ID of the sample to remove

void Audio::pushAudio ( const ustring &  id,
const Sample &  sample 
)

Add an audio sample to the internal map.

Parameters:
id The ID of the audio sample
sample The audio sample to add

Sample * Audio::queryAudio ( const ustring &  id  ) 

Get an audio sample from the internal map.

Parameters:
id The ID of the sample to get
Returns:
Pointer to the requested audio sample


Generated on Fri Feb 22 22:29:23 2008 for Phoenix Wright Case Player API by  doxygen 1.5.3