Jamie Slowgrove - PGG Assignment 1 - SDL
 All Classes Functions
Public Member Functions | List of all members
Audio Class Reference

Creates a Audio object to handle the SDL_Mixer. Done using help from http://www.lazyfoo.net/tutorials/SDL/21_sound_effects_and_music/index.php. More...

#include <audio.h>

Collaboration diagram for Audio:
Collaboration graph

Public Member Functions

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

Detailed Description

Creates a Audio object to handle the SDL_Mixer. Done using help from http://www.lazyfoo.net/tutorials/SDL/21_sound_effects_and_music/index.php.

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

Here is the caller graph for this function:

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:


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