registerAudioProcessor method

FutureOr<int> registerAudioProcessor(
  1. IAudioFrameProcessor processor
)

@detail api @author gongzhengduo @brief Register a custom audio preprocessor.
After that, you can call enableAudioProcessor{@link #RTCEngine#enableAudioProcessor} to process the audio streams that either captured locally or received from the remote side. RTC SDK then encodes or renders the processed data. @param processor Custom audio processor. See IAudioFrameProcessor{@link #IAudioFrameProcessor}。
SDK only holds weak references to the processor, you should guarantee its Life Time. To cancel registration, set the parameter to nullptr. @return - 0: Success. - < 0 : Fail. See ReturnStatus{@link #ReturnStatus} for more details. @note

  • When this interface is repeatedly called, only the last call takes effect.
  • Refer to Custom Audio Processing for more information.

Implementation

FutureOr<int> registerAudioProcessor(IAudioFrameProcessor processor) async {
  return await nativeCall('registerAudioProcessor', [processor]);
}