sendCustomAudioCaptureAACData method

Future<void> sendCustomAudioCaptureAACData(
  1. Uint8List data,
  2. int dataLength,
  3. int configLength,
  4. int referenceTimeMillisecond,
  5. int samples,
  6. ZegoAudioFrameParam param,
  7. {ZegoPublishChannel? channel}
)

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

Available since: 2.20.0 Description: Sends the captured audio AAC data to the SDK. Use cases: 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. 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 AAC buffer data.
  • dataLength The total length of the buffer data.
  • configLength The length of AAC specific config (Note: The AAC encoded data length is 'encodedLength = dataLength - configLength').Value range: 0,64
  • referenceTimeMillisecond The UNIX timestamp of this AAC audio frame in millisecond.
  • samples The number of samples for this AAC audio frame.Value range: 480,512,1024,1960,2048.
  • param The param of this AAC audio frame.
  • channel Publish channel for capturing audio frames.

Implementation

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