Skip to content

AudioFormat

Qt Base Class: QAudioFormat

Signature: QAudioFormat(self) -> None QAudioFormat(self, QAudioFormat: PySide6.QtMultimedia.QAudioFormat) -> None

Base classes

Name Children Inherits
QAudioFormat
PySide6.QtMultimedia
QAudioFormat(self) -> None

⋔ Inheritance diagram

graph TD
  1473573982192["multimedia.AudioFormat"]
  1473573907040["QtMultimedia.QAudioFormat"]
  1473291690208["Shiboken.Object"]
  140713234304496["builtins.object"]
  1473573907040 --> 1473573982192
  1473291690208 --> 1473573907040
  140713234304496 --> 1473291690208

🛈 DocStrings

Bases: QAudioFormat

Source code in prettyqt\multimedia\audioformat.py
class AudioFormat(QtMultimedia.QAudioFormat):
    def set_sample_format(
        self, mode: SampleFormatStr | QtMultimedia.QAudioFormat.SampleFormat
    ):
        self.setSampleFormat(SAMPLE_FORMAT.get_enum_value(mode))

    def get_sample_format(self) -> SampleFormatStr:
        return SAMPLE_FORMAT.inverse[self.sampleFormat()]

    def set_channel_config(
        self, config: ChannelConfigStr | QtMultimedia.QAudioFormat.ChannelConfig
    ):
        self.setChannelConfig(CHANNEL_CONFIG.get_enum_value(config))

    def get_channel_config(self) -> ChannelConfigStr:
        return CHANNEL_CONFIG.inverse[self.channelConfig()]