Jamie Slowgrove - MGP Assignment 2 - JAM
 All Classes Namespaces Files Functions Variables Macros
Audio.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <SDL.h>
4 #include <SDL_mixer.h>
5 #include <string>
6 
12 class JAM_Audio
13 {
14 private:
16  Mix_Music* audio;
18  Mix_Chunk* sound;
19 
20 public:
26  JAM_Audio(std::string file, bool music);
27 
31  ~JAM_Audio();
32 
36  void startAudio();
37 
41  void playEffect();
42 
46  void stopAudio();
47 };
Mix_Music * audio
Definition: Audio.h:16
JAM_Audio(std::string file, bool music)
Definition: Audio.cpp:6
Mix_Chunk * sound
Definition: Audio.h:18
void playEffect()
Definition: Audio.cpp:73
~JAM_Audio()
Definition: Audio.cpp:45
void stopAudio()
Definition: Audio.cpp:82
void startAudio()
Definition: Audio.cpp:60
Creates an Audio object to handle the SDL_Mixer.
Definition: Audio.h:12