diff options
author | Justin McPherson <justin.mcpherson@nokia.com> | 2010-03-08 05:03:40 (GMT) |
---|---|---|
committer | Justin McPherson <justin.mcpherson@nokia.com> | 2010-03-08 05:53:43 (GMT) |
commit | aa5df3c136a5c01d505d3005790907e1bccc4e26 (patch) | |
tree | a016241bd7a29ef85c381c5a866dab33b1cf1876 /src | |
parent | 7a3a25e9a1b7d4925b12297c91b37a2aba03e277 (diff) | |
download | Qt-aa5df3c136a5c01d505d3005790907e1bccc4e26.zip Qt-aa5df3c136a5c01d505d3005790907e1bccc4e26.tar.gz Qt-aa5df3c136a5c01d505d3005790907e1bccc4e26.tar.bz2 |
Remove duration property from QSoundEffect.
Reviewed-by: Dmytro Poplavskiy
Diffstat (limited to 'src')
-rw-r--r-- | src/multimedia/effects/qsoundeffect.cpp | 17 | ||||
-rw-r--r-- | src/multimedia/effects/qsoundeffect_p.h | 4 | ||||
-rw-r--r-- | src/multimedia/effects/qsoundeffect_pulse_p.cpp | 6 | ||||
-rw-r--r-- | src/multimedia/effects/qsoundeffect_pulse_p.h | 2 | ||||
-rw-r--r-- | src/multimedia/effects/qsoundeffect_qmedia_p.cpp | 6 | ||||
-rw-r--r-- | src/multimedia/effects/qsoundeffect_qmedia_p.h | 2 | ||||
-rw-r--r-- | src/multimedia/effects/qsoundeffect_qsound_p.cpp | 5 | ||||
-rw-r--r-- | src/multimedia/effects/qsoundeffect_qsound_p.h | 2 |
8 files changed, 0 insertions, 44 deletions
diff --git a/src/multimedia/effects/qsoundeffect.cpp b/src/multimedia/effects/qsoundeffect.cpp index 3ccca6e..f64d9ee 100644 --- a/src/multimedia/effects/qsoundeffect.cpp +++ b/src/multimedia/effects/qsoundeffect.cpp @@ -100,12 +100,6 @@ QT_BEGIN_NAMESPACE */ /*! - \qmlproperty int SoundEffect::duration - - This property holds the duration in milliseconds of the current source audio. -*/ - -/*! \qmlsignal SoundEffect::sourceChanged() This handler is called when the source has changed. @@ -129,11 +123,6 @@ QT_BEGIN_NAMESPACE This handler is called when the mute state has changed. */ -/*! - \qmlsignal SoundEffect::durationChanged() - - This handler is called when the duration has changed. -*/ QSoundEffect::QSoundEffect(QObject *parent) : QObject(parent) @@ -141,7 +130,6 @@ QSoundEffect::QSoundEffect(QObject *parent) : d = new QSoundEffectPrivate(this); connect(d, SIGNAL(volumeChanged()), SIGNAL(volumeChanged())); connect(d, SIGNAL(mutedChanged()), SIGNAL(mutedChanged())); - connect(d, SIGNAL(durationChanged()), SIGNAL(durationChanged())); } QSoundEffect::~QSoundEffect() @@ -206,11 +194,6 @@ void QSoundEffect::setMuted(bool muted) emit mutedChanged(); } -int QSoundEffect::duration() const -{ - return d->duration(); -} - void QSoundEffect::play() { d->play(); diff --git a/src/multimedia/effects/qsoundeffect_p.h b/src/multimedia/effects/qsoundeffect_p.h index 29cb16c..ec6a2f7 100644 --- a/src/multimedia/effects/qsoundeffect_p.h +++ b/src/multimedia/effects/qsoundeffect_p.h @@ -70,7 +70,6 @@ class Q_MULTIMEDIA_EXPORT QSoundEffect : public QObject Q_PROPERTY(int loopCount READ loopCount WRITE setLoopCount NOTIFY loopCountChanged) Q_PROPERTY(int volume READ volume WRITE setVolume NOTIFY volumeChanged) Q_PROPERTY(bool muted READ isMuted WRITE setMuted NOTIFY mutedChanged) - Q_PROPERTY(int duration READ duration NOTIFY durationChanged) public: explicit QSoundEffect(QObject *parent = 0); @@ -88,14 +87,11 @@ public: bool isMuted() const; void setMuted(bool muted); - int duration() const; - Q_SIGNALS: void sourceChanged(); void loopCountChanged(); void volumeChanged(); void mutedChanged(); - void durationChanged(); public Q_SLOTS: void play(); diff --git a/src/multimedia/effects/qsoundeffect_pulse_p.cpp b/src/multimedia/effects/qsoundeffect_pulse_p.cpp index aa5a14d..c322722 100644 --- a/src/multimedia/effects/qsoundeffect_pulse_p.cpp +++ b/src/multimedia/effects/qsoundeffect_pulse_p.cpp @@ -308,11 +308,6 @@ void QSoundEffectPrivate::setMuted(bool muted) m_muted = muted; } -qint64 QSoundEffectPrivate::duration() const -{ - return m_duration; -} - void QSoundEffectPrivate::play() { if (!m_sampleLoaded) { @@ -437,7 +432,6 @@ void QSoundEffectPrivate::stream_write_callback(pa_stream *s, size_t length, voi pa_stream_finish_upload(s); self->m_duration = self->m_waveDecoder->duration(); - emit self->durationChanged(); self->m_waveDecoder->deleteLater(); self->m_stream->deleteLater(); diff --git a/src/multimedia/effects/qsoundeffect_pulse_p.h b/src/multimedia/effects/qsoundeffect_pulse_p.h index 7353e4f..3aed018 100644 --- a/src/multimedia/effects/qsoundeffect_pulse_p.h +++ b/src/multimedia/effects/qsoundeffect_pulse_p.h @@ -85,13 +85,11 @@ public: void setVolume(int volume); bool isMuted() const; void setMuted(bool muted); - qint64 duration() const; public Q_SLOTS: void play(); Q_SIGNALS: - void durationChanged(); void volumeChanged(); void mutedChanged(); diff --git a/src/multimedia/effects/qsoundeffect_qmedia_p.cpp b/src/multimedia/effects/qsoundeffect_qmedia_p.cpp index e670a36..43ba22f 100644 --- a/src/multimedia/effects/qsoundeffect_qmedia_p.cpp +++ b/src/multimedia/effects/qsoundeffect_qmedia_p.cpp @@ -69,7 +69,6 @@ QSoundEffectPrivate::QSoundEffectPrivate(QObject* parent): m_player = new QMediaPlayer(this, QMediaPlayer::LowLatency); connect(m_player, SIGNAL(volumeChanged(int)), SIGNAL(volumeChanged())); connect(m_player, SIGNAL(mutedChanged(bool)), SIGNAL(mutedChanged())); - connect(m_player, SIGNAL(durationChanged(qint64)), SIGNAL(durationChanged())); connect(m_player, SIGNAL(stateChanged(QMediaPlayer::State)), SLOT(stateChanged(QMediaPlayer::State))); } @@ -117,11 +116,6 @@ void QSoundEffectPrivate::setMuted(bool muted) m_player->setMuted(muted); } -int QSoundEffectPrivate::duration() const -{ - return m_player->duration(); -} - void QSoundEffectPrivate::play() { m_runningCount += m_loopCount; diff --git a/src/multimedia/effects/qsoundeffect_qmedia_p.h b/src/multimedia/effects/qsoundeffect_qmedia_p.h index 73682ea..6ad9d79 100644 --- a/src/multimedia/effects/qsoundeffect_qmedia_p.h +++ b/src/multimedia/effects/qsoundeffect_qmedia_p.h @@ -79,13 +79,11 @@ public: void setVolume(int volume); bool isMuted() const; void setMuted(bool muted); - int duration() const; public Q_SLOTS: void play(); Q_SIGNALS: - void durationChanged(); void volumeChanged(); void mutedChanged(); diff --git a/src/multimedia/effects/qsoundeffect_qsound_p.cpp b/src/multimedia/effects/qsoundeffect_qsound_p.cpp index e6e889e..ff30f67 100644 --- a/src/multimedia/effects/qsoundeffect_qsound_p.cpp +++ b/src/multimedia/effects/qsoundeffect_qsound_p.cpp @@ -123,11 +123,6 @@ void QSoundEffectPrivate::setMuted(bool muted) m_muted = muted; } -int QSoundEffectPrivate::duration() const -{ - return 1000; -} - void QSoundEffectPrivate::play() { m_sound->play(); diff --git a/src/multimedia/effects/qsoundeffect_qsound_p.h b/src/multimedia/effects/qsoundeffect_qsound_p.h index 377c8a7..6fb3cfa 100644 --- a/src/multimedia/effects/qsoundeffect_qsound_p.h +++ b/src/multimedia/effects/qsoundeffect_qsound_p.h @@ -79,13 +79,11 @@ public: void setVolume(int volume); bool isMuted() const; void setMuted(bool muted); - int duration() const; public Q_SLOTS: void play(); Q_SIGNALS: - void durationChanged(); void volumeChanged(); void mutedChanged(); |