AudioSample QML Type
Load audio samples, mostly .wav. 更多...
Import Statement: | import QtAudioEngine 1.1 |
开始支持版本: | Qt 5.0 |
基类: |
属性
信号
方法
- void load()
详细描述
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" } } }
属性
This property holds the name of the sample, which must be unique among all samples and only defined once.
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.
信号
This signal is emitted when loaded is changed.
The corresponding handler is onLoadedChanged
.