startMicDeviceTest method

int startMicDeviceTest(
  1. int interval
)
override

Starting Mic Testing (for Desktop OS)

This API is used to test whether the mic functions properly. The mic volume detected (value range: 0-100) is returned via a callback.

  • Parameters:
    • interval(int):
      • Interval of volume callbacks.

Note When this interface is called, the sound recorded by the microphone will be played back to the speakers by default.

Implementation

int startMicDeviceTest(int interval) {
  if (_only_support_desktop) {
    return _deviceFFIBindings.start_mic_device_test(_nativePointer, interval);
  } else {
    debugPrint("device-manager-api not support");
    return -1;
  }
}