Jamie Slowgrove - PGG Assignment 2
 All Classes Namespaces Files Functions Variables Typedefs Macros
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 file, bool music)
 
 ~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.

Author
Jamie Slowgrove DISCLAMER - This is my PGG Assignment 1 audio class.

Constructor & Destructor Documentation

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

Constructs an Audio object.

Parameters
fileThe file to be loaded.
musicTrue for music file. False for sound file.
Audio::~Audio ( )

Destructs a Audio object.

Member Function Documentation

void Audio::playEffect ( )

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:

Member Data Documentation

Mix_Music* Audio::audio
private

Variable for if it's a Music audio type

Mix_Chunk* Audio::sound
private

Variable for if it's a Sound effect type


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