registerAudioProcessor method
@detail api
@author gongzhengduo
@brief Register a custom audio preprocessor.
After that, you can call enableAudioProcessor:audioFormat:{@link #ByteRTCEngine#enableAudioProcessor:audioFormat} 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 ByteRTCAudioFrameProcessor{@link #ByteRTCAudioFrameProcessor}。
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 ByteRTCReturnStatus{@link #ByteRTCReturnStatus} 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(
id<ByteRTCAudioFrameProcessor> processor) async {
return await nativeCall('registerAudioProcessor:', [processor]);
}