diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-01 17:21:37 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-01 17:21:37 +0200 |
commit | 311e98572c26750e4a4695079fa80ca5648d109e (patch) | |
tree | f28e18a0df9f39932b0e2e4ec292bf01cc7a661f /src/crepe/Sound.h | |
parent | de288a859a631acf6aac10fad825cafaa3744dc9 (diff) |
implement remaining Sound functions
Diffstat (limited to 'src/crepe/Sound.h')
-rw-r--r-- | src/crepe/Sound.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/crepe/Sound.h b/src/crepe/Sound.h index 9da17b9..4c51188 100644 --- a/src/crepe/Sound.h +++ b/src/crepe/Sound.h @@ -46,11 +46,23 @@ public: */ void set_volume(float volume); /** + * \brief Get playback volume / gain + * + * \return Volume + */ + float get_volume() const { return this->volume; } + /** * \brief Set looping behavior for this sample * * \param looping Looping behavior (false = one-shot, true = loop) */ void set_looping(bool looping); + /** + * \brief Get looping behavior + * + * \return true if looping, false if one-shot + */ + bool get_looping() const { return this->looping; } public: Sound(const char * src); @@ -62,6 +74,9 @@ private: private: SoLoud::Wav sample; SoLoud::handle handle; + + float volume = 1.0f; + bool looping = false; }; } |