Jamie Slowgrove - AI Assignment 1
Line of Sight & A* path-finding
 All Classes Namespaces Files Functions Variables
Public Member Functions | Private Attributes | List of all members
Audio Class Reference

Creates an Audio object to handle the SDL_Mixer. DISCLAIMER - This code is from my PGG SDL Assignment. 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 an Audio object to handle the SDL_Mixer. DISCLAIMER - This code is from my PGG SDL Assignment.

Constructor & Destructor Documentation

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

Constructs an Audio object

Parameters
std::stringThe file to be loaded
boolIs it a music file? If false its a sound file
Audio::~Audio ( )

Destructs a Audio object

Member Function Documentation

void Audio::playEffect ( )

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: