9 #ifndef hifi_SoundEffect_h
10 #define hifi_SoundEffect_h
15 #include <SoundCache.h>
16 #include <AudioInjectorManager.h>
21 class SoundEffect :
public QQuickItem {
23 Q_PROPERTY(QUrl source READ getSource WRITE setSource)
24 Q_PROPERTY(
float volume READ getVolume WRITE setVolume)
27 virtual ~SoundEffect();
29 QUrl getSource()
const;
30 void setSource(QUrl url);
32 float getVolume()
const;
33 void setVolume(
float volume);
35 Q_INVOKABLE
void play(
const QVariant& position);
38 float _volume { 1.0f };
39 SharedSoundPointer _sound;
40 AudioInjectorPointer _injector;