From 0fd995ac8b58b460f0740699cee9a221a66f6b56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Str=C3=B8mme?= Date: Mon, 25 Nov 2013 14:17:51 +0100 Subject: Don't use integers to describe volume internally in QSoundEffect. The public api takes floating point values and so does most of the back- ends. Conversion should be done in the back-ends that expect other value types to avoid unnecessary float -> int -> float conversions. Change-Id: I0ee1bfbe350f985294c20f897ffa3bd55288b4c9 Reviewed-by: Yoann Lopes --- src/multimedia/audio/qsoundeffect_pulse_p.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/multimedia/audio/qsoundeffect_pulse_p.h') diff --git a/src/multimedia/audio/qsoundeffect_pulse_p.h b/src/multimedia/audio/qsoundeffect_pulse_p.h index 4dc58f0b6..042679180 100644 --- a/src/multimedia/audio/qsoundeffect_pulse_p.h +++ b/src/multimedia/audio/qsoundeffect_pulse_p.h @@ -80,8 +80,8 @@ public: int loopCount() const; int loopsRemaining() const; void setLoopCount(int loopCount); - int volume() const; - void setVolume(int volume); + qreal volume() const; + void setVolume(qreal volume); bool isMuted() const; void setMuted(bool muted); bool isLoaded() const; @@ -153,7 +153,7 @@ private: bool m_muted; bool m_playQueued; bool m_stopping; - int m_volume; + qreal m_volume; int m_loopCount; int m_runningCount; QUrl m_source; -- cgit v1.2.3