Carpenter Engine
A C++ game engine with a build once run anywhere solution
Loading...
Searching...
No Matches
Music.hpp
1/*
2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at https://mozilla.org/MPL/2.0/.
5 */
6
7#ifndef ENGINE_MUSIC
8#define ENGINE_MUSIC
9
10#include "Audio.hpp"
11
12namespace Engine::Audio {
13
19 class Music : public Audio {
20 public:
21 Music(const char* filename);
22
28 SoundState playing();
29
36 void Pause();
37
43 void setLoop(bool shouldLoop);
44 };
45
49 extern void SkipTrack();
50
51};
52
53#endif
An abstract C++ class used to hold the information of an audio file.
Definition Audio.hpp:39
An Audio file that queues itself into the music player of the engine.
Definition Music.hpp:19
void Pause()
Pauses the music.
Definition Music.cpp:16
SoundState playing()
Returns if the sound is playing or not.
Definition Music.cpp:22
void setLoop(bool shouldLoop)
Sets if the song should loop.
Definition Music.cpp:38