diff options
author | Siteshwar Vashisht <siteshwar@gmail.com> | 2015-03-25 19:43:19 +0530 |
---|---|---|
committer | Konstantin Ritt <ritt.ks@gmail.com> | 2015-04-23 11:56:18 +0000 |
commit | 176d52bb28b425f697ad8df001ba2c7c52fda766 (patch) | |
tree | ffc4740404f9537bcef939acddb25c2cce4f7203 /src/imports/audioengine/qdeclarative_audioengine_p.h | |
parent | 227c8aa723d9e82c2826a1d2823cd73236f18bbb (diff) |
Refactored code for audio engine to allow dynamic object creation
QDeclarativeSound, QDeclarativeAudioSample, QDeclarativeAudioCategory
and QDeclarativeAttenuationModel can now be dynamically added to
AudioEngine instance or declared inside AudioEngine object definition.
QDeclarativePlayVariation can now be dynamically added to Sound
instance or declared inside Sound object definition.
Change-Id: If4c2e16895a71eb71ded1998c107360698f8ac7f
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
Diffstat (limited to 'src/imports/audioengine/qdeclarative_audioengine_p.h')
-rw-r--r-- | src/imports/audioengine/qdeclarative_audioengine_p.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/imports/audioengine/qdeclarative_audioengine_p.h b/src/imports/audioengine/qdeclarative_audioengine_p.h index 51090b5dc..7ae6049f0 100644 --- a/src/imports/audioengine/qdeclarative_audioengine_p.h +++ b/src/imports/audioengine/qdeclarative_audioengine_p.h @@ -111,6 +111,11 @@ public: QSoundInstance* newSoundInstance(const QString &name); void releaseSoundInstance(QSoundInstance* instance); + Q_REVISION(1) Q_INVOKABLE void addAudioSample(QDeclarativeAudioSample *); + Q_REVISION(1) Q_INVOKABLE void addSound(QDeclarativeSound *); + Q_REVISION(1) Q_INVOKABLE void addAudioCategory(QDeclarativeAudioCategory *); + Q_REVISION(1) Q_INVOKABLE void addAttenuationModel(QDeclarativeAttenuationModel *); + Q_SIGNALS: void ready(); void liveInstanceCountChanged(); @@ -149,6 +154,9 @@ private: QList<QDeclarativeSoundInstance*> m_managedDeclSoundInstances; QList<QDeclarativeSoundInstance*> m_managedDeclSndInstancePool; void releaseManagedDeclarativeSoundInstance(QDeclarativeSoundInstance* declSndInstance); + + void initAudioSample(QDeclarativeAudioSample *); + void initSound(QDeclarativeSound *); }; QT_END_NAMESPACE |