AudioSample QML 類型

Load audio samples, mostly .wav. 更多...

import 語句: import QtAudioEngine 1.15
Since: Qt 5.0
繼承:

Item

特性

信號

方法

詳細描述

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.

Rectangle {
    color:"white"
    width: 300
    height: 500
    AudioEngine {
        id:audioengine
        AudioSample {
            name:"explosion"
            source: "explosion-02.wav"
        }
    }
}
					

特性文檔編製

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.

信號文檔編製

loadedChanged ()

此信號發射,當 loaded 改變。

相應處理程序是 onLoadedChanged .

注意: 相應處理程序是 onLoadedChanged .

方法文檔編製

void load ()

Starts loading the sample into memory if not loaded.