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>
Audio::Audio |
( |
std::string |
file, |
|
|
bool |
music |
|
) |
| |
Constructs an Audio object Constructs the Audio object.
- Parameters
-
std::string | the file to be loaded |
bool | is it a music file? if false its a sound file |
De-constructs a Audio object De-constructs the Audio object
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 |
( |
| ) |
|
The documentation for this class was generated from the following files:
- PGGAssignment1SDL/audio.h
- PGGAssignment1SDL/audio.cpp