Skip to content

AudioEngine

Qt Base Class: QAudioEngine

Signature: QAudioEngine(self) -> None QAudioEngine(self, parent: PySide6.QtCore.QObject) -> None QAudioEngine(self, sampleRate: int, parent: Optional[PySide6.QtCore.QObject] = None) -> None

Base classes

Name Children Inherits
ObjectMixin
prettyqt.core.object
QAudioEngine
PySide6.QtSpatialAudio
QAudioEngine(self) -> None

⋔ Inheritance diagram

graph TD
  1473574621472["spatialaudio.AudioEngine"]
  1473299815024["core.ObjectMixin"]
  140713234304496["builtins.object"]
  1473574604880["QtSpatialAudio.QAudioEngine"]
  1473288842240["QtCore.QObject"]
  1473291690208["Shiboken.Object"]
  1473299815024 --> 1473574621472
  140713234304496 --> 1473299815024
  1473574604880 --> 1473574621472
  1473288842240 --> 1473574604880
  1473291690208 --> 1473288842240
  140713234304496 --> 1473291690208

🛈 DocStrings

Bases: ObjectMixin, QAudioEngine

Manages a three dimensional sound field.

Source code in prettyqt\spatialaudio\audioengine.py
class AudioEngine(core.ObjectMixin, QtSpatialAudio.QAudioEngine):
    """Manages a three dimensional sound field."""

    def set_output_mode(
        self, mode: OutputModeStr | QtSpatialAudio.QAudioEngine.OutputMode
    ):
        """Set the output mode.

        Args:
            mode: output mode
        """
        self.setOutputMode(OUTPUT_MODE.get_enum_value(mode))

    def get_output_mode(self) -> OutputModeStr:
        """Return current output mode.

        Returns:
            output mode
        """
        return OUTPUT_MODE.inverse[self.outputMode()]

get_output_mode() -> OutputModeStr

Return current output mode.

Source code in prettyqt\spatialaudio\audioengine.py
def get_output_mode(self) -> OutputModeStr:
    """Return current output mode.

    Returns:
        output mode
    """
    return OUTPUT_MODE.inverse[self.outputMode()]

set_output_mode(mode: OutputModeStr | QtSpatialAudio.QAudioEngine.OutputMode)

Set the output mode.

Parameters:

Name Type Description Default
mode OutputModeStr | OutputMode

output mode

required
Source code in prettyqt\spatialaudio\audioengine.py
def set_output_mode(
    self, mode: OutputModeStr | QtSpatialAudio.QAudioEngine.OutputMode
):
    """Set the output mode.

    Args:
        mode: output mode
    """
    self.setOutputMode(OUTPUT_MODE.get_enum_value(mode))

⌗ Property table

Qt Property Type Doc
objectName QString
outputMode QAudioEngine::OutputMode
outputDevice QAudioDevice
masterVolume float
paused bool
distanceScale float