IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

PlayVariation QML Type

Define a playback variation for sounds. So each time the playback of the same sound can be a slightly different even with the same AudioSample.

This type was introduced in Qt 5.0.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

PlayVariation QML Type

  • Import Statement: import QtAudioEngine 1.1

  • Since: Qt 5.0

  • Inherits: Item

  • Group: PlayVariation is part of multimedia_audioengine

Detailed Description

PlayVariation must be defined inside a Sound or be added to it using Sound.addPlayVariation() if PlayVariation is created dynamically.

 
Sélectionnez
Rectangle {
    color:"white"
    width: 300
    height: 500

    AudioEngine {
        id:audioengine

        AudioSample {
            name:"explosion01"
            source: "explosion-01.wav"
        }

        AudioSample {
            name:"explosion02"
            source: "explosion-02.wav"
        }

        Sound {
            name:"explosion"
            playType: Sound.Random
            PlayVariation {
                sample:"explosion01"
                minPitch: 0.8
                maxPitch: 1.1
            }
            PlayVariation {
                sample:"explosion02"
                minGain: 1.1
                maxGain: 1.5
            }
        }
    }
}

Property Documentation

 

looping : bool

This property indicates whether the playback will be looped or not.

maxGain : real

This property specifies the maximum gain adjustment that can be applied in any playback.

maxPitch : real

This property specifies the maximum pitch adjustment that can be applied in any playback.

minGain : real

This property specifies the minimum gain adjustment that can be applied in any playback.

minPitch : real

This property specifies the minimum pitch adjustment that can be applied in any playback.

sample : string

This property specifies which AudioSample this variation will use.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+