RhythmGame 1.4.3
Loading...
Searching...
No Matches
MultiSound.h
Go to the documentation of this file.
1//
2// Created by copilot on 24.02.26.
3//
4
5#ifndef RHYTHMGAME_MULTISOUND_H
6#define RHYTHMGAME_MULTISOUND_H
7
8#include "Sound.h"
9#include <vector>
10#include <memory>
11
12namespace sounds {
13
20class MultiSound : public Sound
21{
22 std::vector<std::shared_ptr<Sound>> childSounds;
23
24 public:
25 explicit MultiSound(std::vector<std::shared_ptr<Sound>> sounds);
26
27 void play() override;
28 void stop() override;
29 void setVolume(float volume) override;
30 auto isPlaying() const -> bool override;
31 auto getVolume() const -> float override;
32};
33
34} // namespace sounds
35
36#endif // RHYTHMGAME_MULTISOUND_H
A sound that plays multiple underlying sounds simultaneously.
Definition MultiSound.h:21
void stop() override
Stops the sound.
Definition MultiSound.cpp:23
auto isPlaying() const -> bool override
Is the sound playing right now?
Definition MultiSound.cpp:39
auto getVolume() const -> float override
Gets the volume of the sound.
Definition MultiSound.cpp:50
void setVolume(float volume) override
Sets the volume of the sound.
Definition MultiSound.cpp:31
void play() override
Plays the sound.
Definition MultiSound.cpp:15
A sound that can be played.
Definition Sound.h:25
The namespace for all sound related classes.
Definition HitRules.h:16