diff options
Diffstat (limited to 'src/mixer.h')
| -rw-r--r-- | src/mixer.h | 5 |
1 files changed, 5 insertions, 0 deletions
| diff --git a/src/mixer.h b/src/mixer.h index c2a0681..f9c958a 100644 --- a/src/mixer.h +++ b/src/mixer.h | |||
| @@ -77,6 +77,10 @@ public: | |||
| 77 | 77 | ||
| 78 | void unpauseSounds(); | 78 | void unpauseSounds(); |
| 79 | 79 | ||
| 80 | int getSoundVolume() const { return std::round(static_cast<double>(soundVolume_) / MIX_MAX_VOLUME * 10); } | ||
| 81 | |||
| 82 | void setSoundVolume(int vol); | ||
| 83 | |||
| 80 | // name is the name of the file, not containing the extension | 84 | // name is the name of the file, not containing the extension |
| 81 | // ms is the time in milliseconds to fade in | 85 | // ms is the time in milliseconds to fade in |
| 82 | void playMusic(std::string_view name, int ms = 0); | 86 | void playMusic(std::string_view name, int ms = 0); |
| @@ -113,6 +117,7 @@ private: | |||
| 113 | std::string playingTrack_; | 117 | std::string playingTrack_; |
| 114 | int musicVolume_ = MIX_MAX_VOLUME; | 118 | int musicVolume_ = MIX_MAX_VOLUME; |
| 115 | bool musicMuted_ = false; | 119 | bool musicMuted_ = false; |
| 120 | int soundVolume_ = MIX_MAX_VOLUME; | ||
| 116 | }; | 121 | }; |
| 117 | 122 | ||
| 118 | #endif /* end of include guard: MIXER_H_6DF82000 */ | 123 | #endif /* end of include guard: MIXER_H_6DF82000 */ |
