audioDevice QML Value Type
オーディオデバイスについて説明します。詳細...
| Import Statement: | import QtMultimedia |
プロパティ
- description : string
- id : string
- isDefault : bool
- mode : enumeration
詳細な説明
「audioDevice」値型は、システムに接続されているオーディオデバイスのプロパティを記述します。
audioDeviceインスタンスは、対応する物理デバイスが切断されたり、その設定が変更されたりした場合でも、そのライフサイクルを通じてプロパティを保持し続けます。更新されたプロパティを追跡するには、関連するシグナルが発生した際に、MediaDevices からaudioDeviceの新しいインスタンスを読み込む必要があります。
オーディオ入力または出力デバイスのリストは、MediaDevices 型から取得できます。特定のオーディオデバイスを入力または出力として選択するには、AudioInput またはAudioOutput でそのデバイスをデバイスとして設定します。
MediaPlayer {
audioOutput: AudioOutput {
device: mediaDevices.defaultAudioOutput
}
}
MediaDevices {
id: mediaDevices
}プロパティのドキュメント
description : string
オーディオデバイスの人間が読み取れる名前を格納します。
この文字列を使用して、ユーザーにデバイスを表示します。
id : string
オーディオデバイスの識別子を保持します。
デバイス名は、使用しているプラットフォームやオーディオプラグインによって異なります。
これらは、オーディオデバイスに対する一意の識別子です。
isDefault : bool
これがデフォルトのオーディオデバイスである場合にtrueとなります。
mode : enumeration
このデバイスが入力デバイスか出力デバイスかを保持します。
戻り値は、以下のいずれかになります:
| 定数 | 説明 |
|---|---|
AudioDevice.Null | NULLデバイス。 |
AudioDevice.Input | 入力デバイス。 |
AudioDevice.Output | 出力デバイス。 |
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.