SoundInstance QML Type
Play 3d audio content. More...
Import Statement: | import QtAudioEngine 1.1 |
Since: | Qt 5.0 |
Inherits: |
Properties
- direction : vector3d
- engine : QtAudioEngine::AudioEngine
- gain : vector3d
- pitch : vector3d
- position : vector3d
- sound : string
- state : enumeration
- velocity : vector3d
Signals
- directionChanged()
- gainChanged()
- pitchChanged()
- positionChanged()
- soundChanged()
- stateChanged(state)
- velocityChanged()
Methods
Detailed Description
There are two ways to create SoundInstance objects. You can obtain it by calling newInstance method of a Sound:
Or alternatively, you can explicitly define SoundInstance outside of AudioEngine for easier qml bindings:
Property Documentation
direction : vector3d |
This property holds the current 3d direction.
engine : QtAudioEngine::AudioEngine |
This property holds the reference to AudioEngine, must be set only once.
gain : vector3d |
This property holds the gain adjustment which will be used to modulate the audio output level from this SoundInstance.
pitch : vector3d |
This property holds the pitch adjustment which will be used to modulate the audio pitch from this SoundInstance.
position : vector3d |
This property holds the current 3d position.
sound : string |
This property specifies which Sound this SoundInstance will use. Unlike some properties in other types, this property can be changed dynamically.
state : enumeration |
This property holds the current playback state. It can be one of:
Value | Description |
---|---|
StopppedState | The SoundInstance is not playing, and when playback begins next it will play from position zero. |
PlayingState | The SoundInstance is playing the media. |
PausedState | The SoundInstance is not playing, and when playback begins next it will play from the position that it was paused at. |
velocity : vector3d |
This property holds the current 3d velocity.
Signal Documentation
This signal is emitted when direction is changed
The corresponding handler is onDirectionChanged
.
This signal is emitted when gain is changed
The corresponding handler is onGainChanged
.
This signal is emitted when pitch is changed
The corresponding handler is onPitchChanged
.
This signal is emitted when position is changed
The corresponding handler is onPositionChanged
.
This signal is emitted when sound is changed
The corresponding handler is onSoundChanged
.
This signal is emitted when state is changed
The corresponding handler is onStateChanged
.
This signal is emitted when velocity is changed
The corresponding handler is onVelocityChanged
.