AudioEngine QML 类型

AudioEngine manages sound objects inside a 3D scene. 更多...

导入语句: import QtQuick3D.SpatialAudio

特性

详细描述

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

可以使用 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.

创建 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 https://en.wikipedia.org/wiki/Sound_localization) 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.

特性文档编制

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 value 描述
Surround Map the sounds to the loudspeaker configuration of the output device. This is normally a stereo or surround speaker setup.
Stereo Map 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.
Headphone Use Headphone spatialization to create a 3D audio effect when listening to the sound field through headphones.