Caseus Tower
 All Classes Namespaces Files Functions Variables
Audio Class Reference

Creates a Audio object to handle the SDL_Mixer. More...

#include <audio.h>

Public Member Functions

 Audio (std::string, bool)
 
 ~Audio ()
 
void startAudio ()
 
void playEffect ()
 
void stopAudio ()
 

Private Attributes

Mix_Music * audio
 
Mix_Chunk * sound
 

Detailed Description

Creates a Audio object to handle the SDL_Mixer.

Definition at line 10 of file audio.h.

Constructor & Destructor Documentation

Audio::Audio ( std::string  ,
bool   
)

Constructs an Audio object Constructs the Audio object.

Parameters
std::stringthe file to be loaded
boolis it a music file? if false its a sound file
Audio::~Audio ( )

De-constructs a Audio object De-constructs the Audio object

Member Function Documentation

void Audio::playEffect ( )

Plays the sound Plays the sound effect

void Audio::startAudio ( )

Starts the Audio playing Starts the Audio playing, also checks if not playing and starts again

void Audio::stopAudio ( )

Stops the Audio playing

Member Data Documentation

Mix_Music* Audio::audio
private

Definition at line 13 of file audio.h.

Mix_Chunk* Audio::sound
private

Definition at line 14 of file audio.h.


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