enableBeforeAudioPrepAudioData method

Future<void> enableBeforeAudioPrepAudioData(
  1. bool enable,
  2. ZegoAudioFrameParam param
)

Enable the feature of throwing audio data before SDK internal audio preprocessing.

Available since: 3.11.0 Description: Enables the feature of throwing audio data before SDK internal audio preprocessing, and developers can receive audio data before SDK internal audio preprocessing through onBeforeAudioPrepAudioData. When to call: It needs to be called after createEngine to be effective. Restrictions: None.

  • enable Whether to enable feature of throwing audio data before SDK internal audio preprocessing.
  • param param of audio frame. Currently, it supports sampling rates of 0, 16k, 32k, 44.1k, and 48k. The 0 means using SDK internal value. It supports channels Unknown, Mono, and Stereo. The Unknown means using SDK internal value.

Implementation

Future<void> enableBeforeAudioPrepAudioData(
    bool enable, ZegoAudioFrameParam param) async {
  return await ZegoExpressImpl.instance
      .enableBeforeAudioPrepAudioData(enable, param);
}