getAudioDeviceManager method

Future<AudioDeviceManager?> getAudioDeviceManager()

@detail api @author dixing @brief 获取音频设备管理接口 @return 音频设备管理接口 IRTCAudioDeviceManager{@link #IRTCAudioDeviceManager}

Implementation

Future<AudioDeviceManager?> getAudioDeviceManager() async {
  $a() async => packObject(
      await ($instance as $p_a.RTCEngine).getAudioDeviceManager(),
      () => AudioDeviceManager());
  $i() async => packObject(
      await ($instance as $p_i.ByteRTCEngine).getAudioDeviceManager(),
      () => AudioDeviceManager());

  if (Platform.isAndroid) {
    return $a();
  } else if (Platform.isIOS) {
    return $i();
  } else {
    throw UnsupportedError(
        'Not Support Platform ${Platform.operatingSystem}');
  }
}