Skip to content

AudioRoom

Qt Base Class: QAudioRoom

Signature: QAudioRoom(self, engine: PySide6.QtSpatialAudio.QAudioEngine) -> None

Base classes

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

⋔ Inheritance diagram

graph TD
  1473574609760["spatialaudio.AudioRoom"]
  1473299815024["core.ObjectMixin"]
  140713234304496["builtins.object"]
  1473574620496["QtSpatialAudio.QAudioRoom"]
  1473288842240["QtCore.QObject"]
  1473291690208["Shiboken.Object"]
  1473299815024 --> 1473574609760
  140713234304496 --> 1473299815024
  1473574620496 --> 1473574609760
  1473288842240 --> 1473574620496
  1473291690208 --> 1473288842240
  140713234304496 --> 1473291690208

🛈 DocStrings

Bases: ObjectMixin, QAudioRoom

Represents a room with its acoustic properties.

Source code in prettyqt\spatialaudio\audioroom.py
class AudioRoom(core.ObjectMixin, QtSpatialAudio.QAudioRoom):
    """Represents a room with its acoustic properties."""

    def set_wall_material(
        self,
        wall: WallStr | QtSpatialAudio.QAudioRoom.Wall,
        material: MaterialStr | QtSpatialAudio.QAudioRoom.Material,
    ):
        """Set the wall material.

        Args:
            wall: Wall to set
            material: material type
        """
        self.setWallMaterial(WALL.get_enum_value(wall), MATERIAL.get_enum_value(material))

    def get_wall_material(
        self, wall: WallStr | QtSpatialAudio.QAudioRoom.Wall
    ) -> MaterialStr:
        """Return wall material.

        Arguments:
            wall: wall to get material for
        """
        return MATERIAL.inverse[self.wallMaterial(WALL.get_enum_value(wall))]

    def set_dimensions(self, dimensions: datatypes.Vector3DType):
        self.setDimensions(datatypes.to_vector3d(dimensions))

    def set_position(self, position: datatypes.Vector3DType):
        self.setPosition(datatypes.to_vector3d(position))

get_wall_material(wall: WallStr | QtSpatialAudio.QAudioRoom.Wall) -> MaterialStr

Return wall material.

Parameters:

Name Type Description Default
wall WallStr | Wall

wall to get material for

required
Source code in prettyqt\spatialaudio\audioroom.py
def get_wall_material(
    self, wall: WallStr | QtSpatialAudio.QAudioRoom.Wall
) -> MaterialStr:
    """Return wall material.

    Arguments:
        wall: wall to get material for
    """
    return MATERIAL.inverse[self.wallMaterial(WALL.get_enum_value(wall))]

set_wall_material(wall: WallStr | QtSpatialAudio.QAudioRoom.Wall, material: MaterialStr | QtSpatialAudio.QAudioRoom.Material)

Set the wall material.

Parameters:

Name Type Description Default
wall WallStr | Wall

Wall to set

required
material MaterialStr | Material

material type

required
Source code in prettyqt\spatialaudio\audioroom.py
def set_wall_material(
    self,
    wall: WallStr | QtSpatialAudio.QAudioRoom.Wall,
    material: MaterialStr | QtSpatialAudio.QAudioRoom.Material,
):
    """Set the wall material.

    Args:
        wall: Wall to set
        material: material type
    """
    self.setWallMaterial(WALL.get_enum_value(wall), MATERIAL.get_enum_value(material))

⌗ Property table

Qt Property Type Doc
objectName QString
position QVector3D
dimensions QVector3D
rotation QQuaternion
reflectionGain float
reverbGain float
reverbTime float
reverbBrightness float