Sound QML Type
Define a variety of samples and parameters to be used for SoundInstance. More...
Import Statement: | import QtAudioEngine 1.1 |
Since: | Qt 5.0 |
Inherits: |
Properties
- attenuationModel : string
- category : string
- name : string
- playType : enumeration
Methods
- addPlayVariation(PlayVariation playVariation)
- QtAudioEngine::SoundInstance newInstance()
- play()
- play(gain)
- play(gain, pitch)
- play(position)
- play(position, velocity)
- play(position, velocity, direction)
- play(position, gain)
- play(position, velocity, gain)
- play(position, velocity, direction, gain)
- play(position, gain, pitch)
- play(position, velocity, gain, pitch)
- play(position, velocity, direction, gain, pitch)
Detailed Description
Sound can be accessed through QtAudioEngine::AudioEngine::sounds with its unique name and must be defined inside AudioEngine or be added to it using AudioEngine.addSound() if Sound is created dynamically.
Property Documentation
attenuationModel : string |
This property specifies which attenuation model this sound will apply.
category : string |
This property specifies which AudioCategory this sound belongs to.
name : string |
This property holds the name of Sound, must be unique among all sounds and only defined once.
playType : enumeration |
This property holds the playType. It can be one of:
- Random - randomly picks up a play variation when playback is triggered
- Sequential - plays each variation in sequence when playback is triggered
The default value is Random.
Method Documentation
addPlayVariation(PlayVariation playVariation) |
Adds the given playVariation to sound. This can be used when the PlayVariation is created dynamically:
QtAudioEngine::SoundInstance newInstance() |
Returns a new SoundInstance.
Creates a new SoundInstance and starts playing. Position, direction and velocity are all set to "0,0,0"
.
Creates a new SoundInstance and starts playing with the adjusted gain. Position, direction and velocity are all set to "0,0,0"
.
Creates a new SoundInstance and starts playing with the adjusted gain and pitch. Position, direction and velocity are all set to "0,0,0"
.
Creates a new SoundInstance and starts playing with specified position. Direction and velocity are all set to "0,0,0"
.
Creates a new SoundInstance and starts playing with specified position and velocity. Direction is set to "0,0,0"
.
Creates a new SoundInstance and starts playing with specified position, velocity and direction.
Creates a new SoundInstance and starts playing with specified position and adjusted gain. Direction and velocity are all set to "0,0,0"
.
Creates a new SoundInstance and starts playing with specified position, velocity and adjusted gain. Direction is set to "0,0,0"
.
Creates a new SoundInstance and starts playing with specified position, velocity, direction and adjusted gain.
Creates a new SoundInstance and starts playing with specified position, adjusted gain and pitch. Direction and velocity are all set to "0,0,0"
.
Creates a new SoundInstance and starts playing with specified position, velocity, adjusted gain and pitch. Direction is set to "0,0,0"
.
Creates a new SoundInstance and starts playing with specified position, velocity, direction, adjusted gain and pitch.