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 <yoann.lopes@digia.com>
This commit is contained in:
Christian Strømme
2013-11-25 14:17:51 +01:00
committed by The Qt Project
parent 1cf737648b
commit 0fd995ac8b
5 changed files with 22 additions and 22 deletions

View File

@@ -88,7 +88,7 @@ private:
QAudioOutput *m_audioOutput;
QSample *m_sample;
bool m_muted;
int m_volume;
qreal m_volume;
bool m_sampleReady;
qint64 m_offset;
QString m_category;
@@ -113,8 +113,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;