Problem:
Apple's macOS enforces strict sandboxing that prevents apps from accessing system-level resources without explicit permission. By default, this restricts audio recording to an app's sandboxed environment, blocking direct access to system audio output (e.g., sound card capture).
Solution:
To capture system audio, apps require:
-
User-granted permissions (Microphone/Screen Recording in System Settings)
-
Special entitlements (com.apple.security.device.audio-input for audio hardware)
-
Virtual audio drivers for loopback functionality.
User-granted permissions depend on your app's logical setup while the special entitlements should be requested directly from Apple. Virtual audio drivers , on the other hand, require a separate installation but they can be directly linked into the Video Call's audio input process using Agora Video SDKs.
An example of this is the interaction between the AgoraALD driver ( included in the macOS Video SDK versions 3.x ) and the SDK APIs:
- Flutter => enableLoopBackRecording: https://api-ref.agora.io/en/video-sdk/flutter/6.x/API/class_irtcengine.html#api_irtcengine_enableloopbackrecording
- Unity => EnableLoopBackRecording: https://api-ref.agora.io/en/video-sdk/unity/4.x/API/class_irtcengine.html#api_irtcengine_enableloopbackrecording
- macOS => enableLoopBackRecording: https://api-ref.agora.io/en/video-sdk/macos/4.x/documentation/agorartckit/agorartcenginekit/enableloopbackrecording(_:devicename:)
- Unreal Engine => enableLoopBackRecording: https://api-ref.agora.io/en/video-sdk/unreal-engine/4.x/API/class_irtcengine.html#api_irtcengine_enableloopbackrecording
These APIs accepts a deviceName as string therefore you can also install your own virtual audio driver and input its name during the API call. In return, the APIs listed above will use your installed virtual device to capture and mix your system's sound card output into your published audio.