QAudioListener Class▲
-
Header: QAudioListener
-
CMake:
find_package(Qt6 REQUIRED COMPONENTS SpatialAudio)
target_link_libraries(mytarget PRIVATE Qt6::SpatialAudio)
-
qmake: QT += spatialaudio
-
Inherits: QObject
-
Group: QAudioListener is part of spatialaudio, multimedia_audio
Detailed Description▲
A QAudioEngine can have exactly one listener that defines the position and orientation of the person listening to the sound field.
Member Function Documentation▲
[explicit] QAudioListener::QAudioListener(QAudioEngine *engine)▲
Creates a listener for the spatial audio engine for engine.
[virtual] QAudioListener::~QAudioListener()▲
Destroys the listener.
QAudioEngine *QAudioListener::engine() const▲
Returns the engine associated with this listener.
QVector3D QAudioListener::position() const▲
QQuaternion QAudioListener::rotation() const▲
void QAudioListener::setPosition(QVector3D pos)▲
Sets the listener's position in 3D space to pos. Units are in centimeters by default.
See Also▲
See also position(), QAudioEngine::distanceScale