diff options
author | Gareth Stockwell <gareth.stockwell@sosco.com> | 2009-08-21 10:39:36 (GMT) |
---|---|---|
committer | Gareth Stockwell <gareth.stockwell@sosco.com> | 2009-08-21 10:39:36 (GMT) |
commit | 3f39d630d3dcc161c4a85127129274ca7ea857a2 (patch) | |
tree | ba726756cfdd87883fd546ff2f0e5c2b20e64eac /src/3rdparty/phonon/mmf/abstractmediaplayer.h | |
parent | 932c48658656fa328507b16e39c3a6cc820ef15e (diff) | |
download | Qt-3f39d630d3dcc161c4a85127129274ca7ea857a2.zip Qt-3f39d630d3dcc161c4a85127129274ca7ea857a2.tar.gz Qt-3f39d630d3dcc161c4a85127129274ca7ea857a2.tar.bz2 |
Further tidied up volume handling
Diffstat (limited to 'src/3rdparty/phonon/mmf/abstractmediaplayer.h')
-rw-r--r-- | src/3rdparty/phonon/mmf/abstractmediaplayer.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/3rdparty/phonon/mmf/abstractmediaplayer.h b/src/3rdparty/phonon/mmf/abstractmediaplayer.h index 9e0d3c8..58aca84 100644 --- a/src/3rdparty/phonon/mmf/abstractmediaplayer.h +++ b/src/3rdparty/phonon/mmf/abstractmediaplayer.h @@ -57,24 +57,26 @@ namespace Phonon virtual MediaSource source() const; virtual void setFileSource(const Phonon::MediaSource&, RFile&); virtual void setNextSource(const MediaSource &source); + + // VolumeObserver + virtual void volumeChanged(qreal volume); protected: // AbstractPlayer virtual void doSetTickInterval(qint32 interval); - virtual bool doSetVolume(qreal volume); protected: virtual void doPlay() = 0; virtual void doPause() = 0; virtual void doStop() = 0; - virtual int doSetMmfVolume(int mmfVolume) = 0; + virtual int setDeviceVolume(int mmfVolume) = 0; virtual int openFile(RFile& file) = 0; virtual void close() = 0; protected: void startTickTimer(); void stopTickTimer(); - void initVolume(int maxVolume); + void maxVolumeChanged(int maxVolume); /** * Defined private state enumeration in order to add GroundState @@ -111,6 +113,9 @@ namespace Phonon void setError(Phonon::ErrorType error); static qint64 toMilliSeconds(const TTimeIntervalMicroSeconds &); + + private: + void doVolumeChanged(); Q_SIGNALS: void tick(qint64 time); @@ -135,6 +140,8 @@ namespace Phonon bool m_playPending; QScopedPointer<QTimer> m_tickTimer; + + qreal m_volume; int m_mmfMaxVolume; MediaSource m_source; |