W3cubDocs

/Qt

audioDevice QML Basic Type

Methods

The audioDevice value type describes the properties of an audio device that is connected to the system.

The list of audio input or output devices can be queried from the MediaDevices type. To select a certain audio device for input or output set it as the device on AudioInput or AudioOutput.

MediaPlayer {
    audioOutput: AudioOutput {
        device: mediaDevices.defaultAudioOutput
    }
}
MediaDevices {
    id: mediaDevices
}

Method Documentation

string description()

Returns a human readable name of the audio device.

Use this string to present the device to the user.

string id()

Returns an identifier for the audio device.

Device names vary depending on the platform/audio plugin being used.

They are a unique identifier for the audio device.

bool isDefault()

Returns true if this is the default audio device.

enumeration mode()

Tells whether this device is an input or output device.

The returned value can be one of the following:

Property value Description
AudioDevice.Null A null device.
AudioDevice.Input An input device.
AudioDevice.Output An output device.

© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-6.2/qml-audiodevice.html