We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Source::get_gain()
1 parent 4ab5013 commit 98dc65cCopy full SHA for 98dc65c
lib/src/capo.cpp
@@ -296,10 +296,7 @@ class Source : public ISource {
296
ma_sound_set_looping(m_sound.get(), looping ? MA_TRUE : MA_FALSE);
297
}
298
299
- [[nodiscard]] auto get_gain() const -> float final {
300
- if (!is_bound()) { return -1.0f; }
301
- return ma_sound_get_volume(m_sound.get());
302
- }
+ [[nodiscard]] auto get_gain() const -> float final { return m_state.gain; }
303
304
void set_gain(float const gain) final {
305
m_state.gain = std::clamp(gain, 0.0f, 1.0f);
0 commit comments