Agora RTC Objective-C API Reference  Refactor
Data Fields
LoopbackAudioTrackConfig Struct Reference

Data Fields

LOOPBACK_AUDIO_TRACK_TYPE loopbackType
 
int volume
 
const char * deviceName
 
const char * appName
 
unsigned int processId
 

Detailed Description

Defines options for a custom loopback audio track.

@technical preview

Constructor & Destructor Documentation

◆ LoopbackAudioTrackConfig()

Field Documentation

◆ loopbackType

Specifies the loopback source type. Possible values are defined by LOOPBACK_AUDIO_TRACK_TYPE (e.g., system audio, specific application, or process). Default: LOOPBACK_SYSTEM.

◆ volume

int volume

Initial publish volume for the loopback audio, valid in the range [0, 400]. 0: mute; 100: original volume; 400: maximum amplified volume. Default is 100.

◆ deviceName

const char* deviceName

Playback device name to capture loopback audio from.

Platform-specific notes:

  • Windows: Not supported for now. The deviceName parameter is ignored on Windows.
  • macOS: For LOOPBACK_SYSTEM or LOOPBACK_SYSTEM_EXCLUDE_SELF, if set, uses the named virtual device; if NULL, uses the default. For LOOPBACK_APPLICATION and LOOPBACK_PROCESS, ignored.

If set, the name must exactly match the target playback device. Set to NULL to use the platform default selection.

◆ appName

const char* appName

Name of the application to capture audio from. Only used if loopbackType is LOOPBACK_APPLICATION; otherwise ignored. Must be an exact, case-sensitive match of the application name. Set to NULL if not capturing a specific application.

◆ processId

unsigned int processId

Process ID of the target application to capture audio from. Only used if loopbackType is LOOPBACK_PROCESS; otherwise ignored. Default is -1.