15 #include <SDL2/SDL_mixer.h>
Encapsulates sound management functionality using SDL_mixer.
void stop()
Stops all sound on the channel used by this sound.
~Sound()
Destructor that frees the loaded sound.
void play(int loops)
Plays the loaded sound.
void resume()
Resumes all paused sound on the channel used by this sound.
void pause()
Pauses all sound on the channel used by this sound.
void setVolume(int volume)
Sets the volume for the channel used by this sound.
Sound(std::string path)
Constructor that initializes the SDL_mixer and loads sound from a specified path.
Mix_Chunk * m_sound
Pointer to the sound data loaded from a file.