Flock You!
 All Classes Files Functions Variables
Public Member Functions | Private Attributes | List of all members
Audio Class Reference

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

#include <audio.h>

Collaboration diagram for Audio:
Collaboration graph

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.

Constructor & Destructor Documentation

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

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

Here is the caller graph for this function:

void Audio::stopAudio ( )

Stops the Audio playing

Here is the caller graph for this function:

Member Data Documentation

Mix_Music* Audio::audio
private
Mix_Chunk* Audio::sound
private

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