Qt Spatial Audio

Qt Spatial Audio is an add-on module that provides a rich set of QML types and C++ classes to implement sound fields in 3D space. It contains an easy to use API for positing a listener in space, adding localized sound sources around the listener and emulating virtual rooms with reverb and reflections.

Getting started

If you are new to Qt Spatial Audio, the QML types can be imported into an application using the following statement in your .qml file.

import QtQuick3D.SpatialAudio

To link against the C++ libraries, add the following to your project's CMakeLists.txt file. Substitute my_project with the name of your project.

find_package(Qt6 REQUIRED COMPONENTS SpatialAudio)
target_link_libraries(my_project PRIVATE Qt6::SpatialAudio)

Spatial Audio Overview provides a more detailed description about how to use the different classes listed below.

QML Types

The following table outlines some important QML types.

TypeDescription
AudioEngineThe engine doing the processing of the audio scene
SpatialSoundA sound source located in 3D space.
AmbientSoundA location independent stereo sound track.
AudioRoomDefines a room that generates audio reverb and reflections.

C++ Classes

The following table outlines some important C++ Classes

ClassDescription
QAudioEngineThe engine doing the processing of the audio scene
QSpatialSoundA sound source located in 3D space.
QAmbientSoundA location independent stereo sound track.
QAudioRoomDefines a room that generates audio reverb and reflections.

Licenses and Attributions

The Qt Spatial Audio module is available under commercial licenses from The Qt Company. In addition, it is available under free software licenses. These free software licenses are GNU Lesser General Public License, version 3, or the GNU General Public License, version 3. See Qt Licensing for further details.

Note that Qt Spatial Audio is not available under the GNU General Public License, version 2.

Furthermore, Qt Spatial Audio in Qt 6.5.8 contains third party modules under the following permissive licenses:

Eigen, version 3.4.0

Mozilla Public License 2.0 and BSD 3-Clause "New" or "Revised" License

Resonance Audio, version e225aedb5ec7

Apache License 2.0

pfft, version fbc4058602803f40dc554b8a5d2bcc694c005f2f

BSD 3-Clause "New" or "Revised" License

Reference and Examples

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