sendCustomAudioCapturePCMData method

Future<void> sendCustomAudioCapturePCMData(
  1. Uint8List data,
  2. int dataLength,
  3. ZegoAudioFrameParam param,
  4. {ZegoPublishChannel? channel}
)

Sends PCM audio data produced by custom audio capture to the SDK (for the specified channel).

Available since: 1.10.0 Description: Sends the captured audio PCM data to the SDK. Use cases: 1.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. 2.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. When to call: After enableCustomAudioIO and publishing stream successfully. Restrictions: None. Related APIs: Enable the custom audio IO function enableCustomAudioIO, and start the push stream startPublishingStream.

  • data PCM buffer data.
  • dataLength The total length of the buffer data.
  • param The param of this PCM audio frame.
  • channel Publish channel for capturing audio frames.

Implementation

Future<void> sendCustomAudioCapturePCMData(
    Uint8List data, int dataLength, ZegoAudioFrameParam param,
    {ZegoPublishChannel? channel}) async {
  return await ZegoExpressImpl.instance.sendCustomAudioCapturePCMData(
      data, dataLength, param,
      channel: channel);
}