AttenuationModelLinearDefines a linear attenuation curve for a Sound. More... Inherits Item This type was introduced in Qt 5.0. PropertiesDetailed DescriptionThis type is part of the QtAudioEngine 1.0 module. AttenuationModelLinear must be defined inside AudioEngine. import QtQuick 2.0 import QtAudioEngine 1.0 Rectangle { color:"white" width: 300 height: 500 AudioEngine { id:audioengine AttenuationModelLinear { name:"linear" start: 20 end: 180 } AudioSample { name:"explosion" source: "explosion-02.wav" } Sound { name:"explosion" attenuationModel: "linear" PlayVariation { sample:"explosion" } } } } Property DocumentationThis 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. This property holds the name of AttenuationModelLinear, must be unique among all attenuation models and only defined once. 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. |