 +                                &input_callback, sizeof(input_callback));
 +  if (result != noErr) {
 +    //_vpAudioUnit->DisposeAudioUnit();
-+    NSLog(@"Failed to specify the input callback on the input bus. "
++    RTCLogError(@"Failed to specify the input callback on the input bus. "
 +                 "Error=%ld.",
 +                (long)result);
 +    error = [[NSError alloc] initWithDomain:kRTCAudioSessionErrorDomain

+  // Specify the callback to be called by the I/O thread to us when input audio
+  // is available. The recorded samples can then be obtained by calling the
+  // AudioUnitRender() method.
+  NSLog(@"Specify the callback to be called by the I/O thread to us when input audio is available.");
+  AURenderCallbackStruct input_callback;
+  input_callback.inputProc = _vpAudioUnit->OnDeliverRecordedData;
+  input_callback.inputProcRefCon = _vpAudioUnit;

   // called, they will invoke the relevant instance method by casting
   // in_ref_con to VoiceProcessingAudioUnit*.
diff --git a/sdk/objc/native/src/audio/voice_processing_audio_unit.mm b/sdk/objc/native/src/audio/voice_processing_audio_unit.mm
index 15a09b31e2..531b16a751 100644
--- a/sdk/objc/native/src/audio/voice_processing_audio_unit.mm
+++ b/sdk/objc/native/src/audio/voice_processing_audio_unit.mm
@@ -15,6 +15,7 @@
