AudioEngine QML Type

AudioEngine manages sound objects inside a 3D scene. More...

Import Statement: import QtQuick3D.SpatialAudio


Detailed Description

AudioEngine manages sound objects inside a 3D scene. You can add SpatialSound objects to the scene to define sounds that happen at a specified location in 3D space. AmbientSound allows you to add a stereo overlay (for example voice over or a sound track).

You can use AudioListener to define the position of the person listening to the sound field relative to the sound sources. Sound sources will be less audible if the listener is further away from source. They will also get mapped to the corresponding loudspeakers depending on the direction between listener and source. In many cases, the AudioListener object can simply be instantiated as a child object of the QtQuick3D.Camera object.

Create AudioRoom objcects to simulate the sound (reflections and reverb) of a room with certain dimensions and different types of walls.

AudioEngine does offer a mode where Qt is using simulating the effects of the ear using head related impulse reponse functions (see also to localize the sound in 3D space when using headphones and create a spatial audio effect through headphones.

As the rest of Qt Quick 3D, the audio engine uses a coordinate system that is in centimeters by default. The axes are defined so that positive x points to the right, positive y points up and positive z points backwards.

Property Documentation

masterVolume : float

Sets or returns overall volume being used to render the sound field.

outputDevice : QtMultimedia.AudioDevice

Sets or returns the device that is being used for outputting the sound field.

outputMode : enumeration

Sets or retrieves the current output mode of the engine.

Property valueDescription
SurroundMap the sounds to the loudspeaker configuration of the output device. This is normally a stereo or surround speaker setup.
StereoMap the sounds to the stereo loudspeaker configuration of the output device. This will ignore any additional speakers and only use the left and right channels to create a stero rendering of the sound field.
HeadphoneUse Headphone spatialization to create a 3D audio effect when listening to the sound field through headphones.

© 2022 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.