Level H Engine
Music.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 #include <SDL_mixer.h>
5 
9 class Music
10 {
11 public:
16  Music(std::string file);
17 
21  ~Music();
22 
26  void startMusic();
27 
31  void stopMusic();
32 
36  void muteMusic();
37 
41  void unmuteMusic();
42 
43 private:
45  Mix_Music* music;
46 };
void startMusic()
Starts the Music playing, also checks if not playing and starts again.
Definition: Music.cpp:23
~Music()
Destructs the Music object.
Definition: Music.cpp:17
void stopMusic()
Stops the Music playing.
Definition: Music.cpp:33
Mix_Music * music
Variable for the music.
Definition: Music.h:45
void muteMusic()
Mute the Music.
Definition: Music.cpp:39
Handles music using SDL_Mixer.
Definition: Music.h:9
Music(std::string file)
Constructs the Music object.
Definition: Music.cpp:6
void unmuteMusic()
Un-mute the Music.
Definition: Music.cpp:45