onAudioDeviceCaptureVolumeChanged property

(void Function(int volume, bool muted)?) onAudioDeviceCaptureVolumeChanged
final

The Capturing Volume of the Mic Changed

On desktop OS such as macOS and Windows, users can set the capturing volume of the mic in the audio control panel.

The higher volume a user sets, the higher the volume of raw audio captured by the mic.

On some keyboards and laptops, users can also mute the mic by pressing a key (whose icon is a crossed-out mic).

When users set the mic capturing volume via the UI or a keyboard shortcut, the SDK will return this callback.

  • Parameters:
    • muted(bool):
      • Whether the mic is muted. true: muted; false: unmuted.
    • volume(int):
      • System audio capturing volume, which users can set in the audio control panel. Value range: 0-100.

Note You need to call enableAudioVolumeEvaluation and set the callback interval (interval > 0) to enable the callback. To disable the callback, set interval to 0.

Implementation

final void Function(int volume, bool muted)? onAudioDeviceCaptureVolumeChanged;