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

AudioSample QML Type

Load audio samples, mostly .wav.

This type was introduced in Qt 5.0.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

AudioSample QML Type▲

  • Import Statement: import QtAudioEngine 1.1

  • Since: Qt 5.0

  • Inherits: Item

  • Group: AudioSample is part of multimedia_audioengine

Detailed Description▲

It can be accessed through QtAudioEngine::AudioEngine::samples with its unique name and must be defined inside AudioEngine or be added to it using AudioEngine.addAudioSample() if AudioSample is created dynamically.

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

    AudioEngine {
        id:audioengine

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

Property Documentation▲

 

[read-only] loaded : bool▲

This property indicates whether this sample has been loaded into memory or not.

name : string▲

This property holds the name of the sample, which must be unique among all samples and only defined once.

preloaded : bool▲

This property indicates whether this sample needs to be preloaded or not. If true, the audio engine will start loading the sample file immediately when the application starts, otherwise the sample will not be loaded until explicitly requested.

source : url▲

This property holds the source URL of the audio sample.

Signal Documentation▲

 

loadedChanged()▲

This signal is emitted when loaded is changed.

The corresponding handler is onLoadedChanged.

The corresponding handler is onLoadedChanged.

Method Documentation▲

 

void load()▲

Starts loading the sample into memory if not loaded.

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