enableLoopbackRecordingEx abstract method

Future<void> enableLoopbackRecordingEx({
  1. required RtcConnection connection,
  2. required bool enabled,
  3. String? deviceName,
})

Enables loopback audio capturing.

If you enable loopback audio capturing, the output of the sound card is mixed into the audio stream sent to the other end. This method applies to the macOS and Windows only. macOS does not support loopback audio capture of the default sound card. If you need to use this function, use a virtual sound card and pass its name to the deviceName parameter. Agora recommends using AgoraALD as the virtual sound card for audio capturing. This method only supports using one sound card for audio capturing.

  • connection The connection information. See RtcConnection.
  • enabled Sets whether to enable loopback audio capture: true : Enable loopback audio capturing. false : (Default) Disable loopback audio capturing.
  • deviceName macOS: The device name of the virtual sound card. The default value is set to NULL, which means using AgoraALD for loopback audio capturing. Windows: The device name of the sound card. The default is set to NULL, which means the SDK uses the sound card of your device for loopback audio capturing.

Returns When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly.

Implementation

Future<void> enableLoopbackRecordingEx(
    {required RtcConnection connection,
    required bool enabled,
    String? deviceName});