Skip to content

AmbientSound

Qt Base Class: QAmbientSound

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

Base classes

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

⋔ Inheritance diagram

graph TD
  1473574588288["spatialaudio.AmbientSound"]
  1473299815024["core.ObjectMixin"]
  140713234304496["builtins.object"]
  1473574593168["QtSpatialAudio.QAmbientSound"]
  1473288842240["QtCore.QObject"]
  1473291690208["Shiboken.Object"]
  1473299815024 --> 1473574588288
  140713234304496 --> 1473299815024
  1473574593168 --> 1473574588288
  1473288842240 --> 1473574593168
  1473291690208 --> 1473288842240
  140713234304496 --> 1473291690208

🛈 DocStrings

Bases: ObjectMixin, QAmbientSound

A stereo overlay sound.

Source code in prettyqt\spatialaudio\ambientsound.py
class AmbientSound(core.ObjectMixin, QtSpatialAudio.QAmbientSound):
    """A stereo overlay sound."""

    def set_source(self, source: datatypes.UrlType):
        self.setSource(datatypes.to_local_url(source))

    def get_source(self) -> pathlib.Path:
        return pathlib.Path(self.source().toString())

⌗ Property table

Qt Property Type Doc
objectName QString
source QUrl
volume float
loops int
autoPlay bool