aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/Sound.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/Sound.h')
-rw-r--r--src/crepe/Sound.h15
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;
};
}