Documentation
ExpressVideoSDK Video Call
Documentation
Demo APP
SDK Center
API Center
FAQ
Code Market
Console
Sign Up
Log In
中文站 English
  • Documentation
  • Video Call
  • Upgrade using advanced features
  • Distincitve features
  • Customize the video and audio
  • Customize how the audio captures and renders

Customize how the audio captures and renders

Last updated:2023-11-14 14:58

Introduction

Custom Audio Capture

In the following situations, it is recommended to use the custom audio capture function:

  • The customer needs to obtain input after acquisition from the existing audio stream, audio file, or customized acquisition system, and hand it over to the SDK for transmission.
  • Customers have their own requirements for special sound processing for PCM input sources. After the sound processing, the input will be sent to the SDK for transmission.

Custom Audio Rendering

When developers have their own rendering requirements, such as special applications or processing and rendering of the original PCM data that are pulled, it is recommended to use the custom audio rendering function of the SDK.

After the developer adopts external acquisition and rendering, the SDK is not responsible for functions such as sound enhancement, noise suppression, and echo cancellation, and needs to be implemented by the user.

Prerequisites

Before you begin, make sure you complete the following:

  • Create a project in ZEGOCLOUD Admin Console and get the AppID and AppSign of your project.

  • Refer to the Quick Start doc to complete the SDK integration and basic function implementation.

Enable Custom Audio Capture and Rendering Function

// Set the audio source to custom capture and render
ZegoCustomAudioConfig *audioConfig = [[ZegoCustomAudioConfig alloc] init];
audioConfig.sourceType = ZegoAudioSourceTypeCustom;

[[ZegoExpressEngine sharedEngine] enableCustomAudioIO:YES config:audioConfig];

Collect Audio Data

After publishing or playing a stream, turn on the audio capture device and pass the collected audio data to the engine through sendCustomAudioCaptureAACData or sendCustomAudioCapturePCMData.

Render Audio Data

Use fetchCustomAudioRenderPCMData to get the data to be rendered from the engine, and then use the rendering device to play the audio data.

Page Directory
  • Free trial
  • 提交工单
    咨询集成、功能及报价等问题
    电话咨询
    400 1006 604
    Get Consulting
    Scan Wechat QR code