AttenuationModelLinear QML Type

Defines a linear attenuation curve for a Sound. More...

Import Statement: import QtAudioEngine 1.15
Since: Qt 5.0



Detailed Description

AttenuationModelLinear must be defined inside AudioEngine or be added to it using AudioEngine.addAttenuationModel() if AttenuationModelLinear is created dynamically.

Rectangle {
    width: 300
    height: 500

    AudioEngine {

        AttenuationModelLinear {
           start: 20
           end: 180

        AudioSample {
            source: "explosion-02.wav"

        Sound {
            attenuationModel: "linear"
            PlayVariation {

Property Documentation

end : real

This property holds the end distance. There will be no sound hearable if the distance from sound to listener is larger than this. The default value is 1.

name : string

This property holds the name of AttenuationModelLinear, must be unique among all attenuation models and only defined once.

start : real

This property holds the start distance. There will be no attenuation if the distance from sound to listener is within this range. The default value is 0.

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.