The Game Engine  1
Audio Class Reference

An Audio Interface. More...

#include <Audio.h>

+ Collaboration diagram for Audio:

Public Member Functions

 Audio ()
 Initialize Audio Object. More...
 
int LoadAudio (std::string name, string location=NULL, bool play_on_start=true, int play_count=1)
 
void LoadAudioConfig ()
 Load Audio from Config. More...
 
void initialize ()
 Open The Audio Device. More...
 
void play (int index)
 Plays a Sound. More...
 
void stop (int index)
 Stops a Sound. More...
 
void stopAll ()
 Stops all sounds. More...
 
void tone ()
 Play an Audio Test Tone. More...
 

Protected Attributes

map< std::string, int > mCached
 Stores cached audio samples. More...
 

Detailed Description

An Audio Interface.

This class is tasked with the following:

  • Loading Level Specific Audio Configurations
    • Playing and Stopping a Sound directly
    • Providing an interface between SDL Audio and the engine

Definition at line 17 of file Audio.h.

Constructor & Destructor Documentation

Audio::Audio ( )

Initialize Audio Object.

Definition at line 17 of file Audio.cpp.

+ Here is the call graph for this function:

Member Function Documentation

void Audio::initialize ( )

Open The Audio Device.

int Audio::LoadAudio ( std::string  name,
string  location = NULL,
bool  play_on_start = true,
int  play_count = 1 
)

Definition at line 42 of file Audio.cpp.

+ Here is the caller graph for this function:

void Audio::LoadAudioConfig ( )

Load Audio from Config.

void Audio::play ( int  index)

Plays a Sound.

Definition at line 94 of file Audio.cpp.

+ Here is the caller graph for this function:

void Audio::stop ( int  index)

Stops a Sound.

Definition at line 109 of file Audio.cpp.

void Audio::stopAll ( )

Stops all sounds.

Definition at line 120 of file Audio.cpp.

void Audio::tone ( )

Play an Audio Test Tone.

Definition at line 138 of file Audio.cpp.

+ Here is the call graph for this function:

Member Data Documentation

map<std::string,int> Audio::mCached
protected

Stores cached audio samples.

Definition at line 65 of file Audio.h.


The documentation for this class was generated from the following files: