diff options
author | Justin McPherson <justin.mcpherson@nokia.com> | 2010-03-08 03:45:33 (GMT) |
---|---|---|
committer | Justin McPherson <justin.mcpherson@nokia.com> | 2010-03-08 05:53:08 (GMT) |
commit | 2e501c4d45dddba3db2d8817a27380615c1ce8fd (patch) | |
tree | 89598b65b64a0425868e8335e794ba380330fab9 /src/multimedia/effects/qsoundeffect_pulse_p.h | |
parent | a8b5200403742272811f095c0710193a27eed466 (diff) | |
download | Qt-2e501c4d45dddba3db2d8817a27380615c1ce8fd.zip Qt-2e501c4d45dddba3db2d8817a27380615c1ce8fd.tar.gz Qt-2e501c4d45dddba3db2d8817a27380615c1ce8fd.tar.bz2 |
Refactor QSoundEffect.
Reviewed-by: Dmytro Poplavskiy
Diffstat (limited to 'src/multimedia/effects/qsoundeffect_pulse_p.h')
-rw-r--r-- | src/multimedia/effects/qsoundeffect_pulse_p.h | 39 |
1 files changed, 18 insertions, 21 deletions
diff --git a/src/multimedia/effects/qsoundeffect_pulse_p.h b/src/multimedia/effects/qsoundeffect_pulse_p.h index 247f8a3..7353e4f 100644 --- a/src/multimedia/effects/qsoundeffect_pulse_p.h +++ b/src/multimedia/effects/qsoundeffect_pulse_p.h @@ -77,30 +77,25 @@ public: explicit QSoundEffectPrivate(QObject* parent); ~QSoundEffectPrivate(); - qint64 duration() const; + QUrl source() const; + void setSource(const QUrl &url); + int loopCount() const; + void setLoopCount(int loopCount); int volume() const; + void setVolume(int volume); bool isMuted() const; - QMediaContent media() const; - QMediaPlayer::State state() const; - QMediaPlayer::MediaStatus mediaStatus() const; + void setMuted(bool muted); + qint64 duration() const; public Q_SLOTS: void play(); - void stop(); - void setVolume(int volume); - void setMuted(bool muted); - void setMedia(const QMediaContent &media); Q_SIGNALS: - void mediaChanged(const QMediaContent &media); - void mediaStatusChanged(QMediaPlayer::MediaStatus status); - void stateChanged(QMediaPlayer::State newState); - void durationChanged(qint64 duration); - void volumeChanged(int volume); - void mutedChanged(bool muted); - void error(QMediaPlayer::Error error); - -private slots: + void durationChanged(); + void volumeChanged(); + void mutedChanged(); + +private Q_SLOTS: void decoderReady(); void decoderError(); void checkPlayTime(); @@ -108,6 +103,7 @@ private slots: private: void loadSample(); void unloadSample(); + void playSample(); void timerEvent(QTimerEvent *event); @@ -117,14 +113,15 @@ private: bool m_muted; bool m_playQueued; - int m_vol; + bool m_sampleLoaded; + int m_volume; int m_duration; int m_dataUploaded; + int m_loopCount; + int m_runningCount; + QUrl m_source; QTime m_playbackTime; - QMediaPlayer::State m_state; - QMediaPlayer::MediaStatus m_status; QByteArray m_name; - QMediaContent m_media; QNetworkReply *m_reply; WaveDecoder *m_waveDecoder; QIODevice *m_stream; |