Index: webrtc/modules/audio_device/ios/audio_device_ios.mm |
diff --git a/webrtc/modules/audio_device/ios/audio_device_ios.mm b/webrtc/modules/audio_device/ios/audio_device_ios.mm |
index 0bb997db53c425ec03cf84811cef7891063e870f..1eddd208e8f4fe484d8c921f50bc34e35ab7d8c0 100644 |
--- a/webrtc/modules/audio_device/ios/audio_device_ios.mm |
+++ b/webrtc/modules/audio_device/ios/audio_device_ios.mm |
@@ -822,6 +822,9 @@ bool AudioDeviceIOS::InitPlayOrRecord() { |
void AudioDeviceIOS::ShutdownPlayOrRecord() { |
LOGI() << "ShutdownPlayOrRecord"; |
+ // Stop the audio unit to prevent any additional audio callbacks. |
+ audio_unit_->Stop(); |
+ |
// Close and delete the voice-processing I/O unit. |
audio_unit_.reset(); |