RhythmGame 1.4.3
Loading...
Searching...
No Matches
Sound.h
Go to the documentation of this file.
1//
2// Created by bobini on 14.01.23.
3//
4
5#ifndef RHYTHMGAME_SOUND_H
6#define RHYTHMGAME_SOUND_H
7#include <QObject>
8#include <spdlog/spdlog.h>
9#include "MiniaudioBackend.h"
10
16namespace sounds {
17
24class Sound
25{
26 public:
27 virtual ~Sound() = default;
28
34 virtual void play() = 0;
39 virtual void stop() = 0;
40
45 virtual void setVolume(float volume) = 0;
46
50 virtual auto isPlaying() const -> bool = 0;
51
56 virtual auto getVolume() const -> float = 0;
57};
58} // namespace sounds
59#endif // RHYTHMGAME_SOUND_H
A sound that can be played.
Definition Sound.h:25
virtual auto getVolume() const -> float=0
Gets the volume of the sound.
virtual auto isPlaying() const -> bool=0
Is the sound playing right now?
virtual void setVolume(float volume)=0
Sets the volume of the sound.
virtual ~Sound()=default
virtual void play()=0
Plays the sound.
virtual void stop()=0
Stops the sound.
The namespace for all sound related classes.
Definition HitRules.h:16