Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2145)

Unified Diff: webrtc/modules/audio_device/ios/audio_device_ios.mm

Issue 2079383002: Avoid race when stopping audio unit on iOS (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/modules/audio_device/ios/voice_processing_audio_unit.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « no previous file | webrtc/modules/audio_device/ios/voice_processing_audio_unit.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698