PySide6.QtSpatialAudio.QAudioListener

class QAudioListener

Defines the position and orientation of the person listening to a sound field defined by QAudioEngine .

Details

A QAudioEngine can have exactly one listener that defines the position and orientation of the person listening to the sound field.

Inheritance diagram of PySide6.QtSpatialAudio.QAudioListener

Synopsis

Methods

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

__init__(engine)
Parameters:

engineQAudioEngine

Creates a listener for the spatial audio engine for engine.

engine()
Return type:

QAudioEngine

Returns the engine associated with this listener.

position()
Return type:

QVector3D

Returns the current position of the listener.

See also

setPosition()

rotation()
Return type:

QQuaternion

Returns the listener’s orientation in 3D space.

See also

setRotation()

setPosition(pos)
Parameters:

posQVector3D

Sets the listener’s position in 3D space to pos. Units are in centimeters by default.

setRotation(q)
Parameters:

qQQuaternion

Sets the listener’s orientation in 3D space to q.

See also

rotation()