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

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

Issue 2349263004: Ensures that ADM for Android and iOS uses identical states when stopping audio (Closed)
Patch Set: Created 4 years, 3 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 | no next file » | 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 3a745a4b459cd6b6522a58cd3acfca21517debac..8d03ba32f38e2cb71cb1173985a2ba3afc8cccba 100644
--- a/webrtc/modules/audio_device/ios/audio_device_ios.mm
+++ b/webrtc/modules/audio_device/ios/audio_device_ios.mm
@@ -217,11 +217,7 @@ int32_t AudioDeviceIOS::StartPlayout() {
int32_t AudioDeviceIOS::StopPlayout() {
LOGI() << "StopPlayout";
RTC_DCHECK(thread_checker_.CalledOnValidThread());
- if (!play_is_initialized_) {
- return 0;
- }
- if (!playing_) {
- play_is_initialized_ = false;
+ if (!play_is_initialized_ || !playing_) {
sophiechang-webrtc 2016/09/21 10:43:54 as mentioned offline, i think it would be good to
return 0;
}
if (!recording_) {
@@ -256,11 +252,7 @@ int32_t AudioDeviceIOS::StartRecording() {
int32_t AudioDeviceIOS::StopRecording() {
LOGI() << "StopRecording";
RTC_DCHECK(thread_checker_.CalledOnValidThread());
- if (!rec_is_initialized_) {
- return 0;
- }
- if (!recording_) {
- rec_is_initialized_ = false;
+ if (!rec_is_initialized_ || !recording_) {
return 0;
}
if (!playing_) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698