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

Issue 1254883002: Refactor the AudioDevice for iOS and improve the performance and stability (Closed)

Created:
5 years, 5 months ago by henrika_webrtc
Modified:
5 years, 3 months ago
CC:
webrtc-reviews_webrtc.org
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Refactor the AudioDevice for iOS and improve the performance and stability This CL contains major modifications of the audio output parts for WebRTC on iOS: - general code cleanup - improves thread handling (added thread checks, remove critical section, atomic ops etc.) - reduces loopback latency of iPhone 6 from ~90ms to ~60ms ;-) - improves selection of audio parameters on iOS - reduces complexity by removing complex and redundant delay estimates - now instead uses fixed delay estimates if for some reason the SW EAC must be used - adds AudioFineBuffer to compensate for differences in native output buffer size and the 10ms size used by WebRTC. Same class as is used today on Android and we have unit tests for this class (the old code was buggy and we have several issue reports of crashes related to it) Similar improvements will be done for the recording sid as well in a separate CL. I will also add support for 48kHz in an upcoming CL since that will improve Opus performance. BUG=webrtc:4796, webrtc:4817, webrtc:4954, webrtc:4212 TEST=AppRTC demo and iOS modules_unittests using --gtest_filter=AudioDevice* R=pbos@webrtc.org, tkchin@webrtc.org Committed: https://chromium.googlesource.com/external/webrtc/+/86d907cffda803ee34ee68f9833c1980d1b9f7a6

Patch Set 1 #

Patch Set 2 : Added SetupVoiceProcessingAudioUnit #

Patch Set 3 : Improved stream description settings #

Patch Set 4 : Improved the setup and initialization part #

Patch Set 5 : Improved playout buffer handling #

Patch Set 6 : Removed delay estimates #

Patch Set 7 : Extended FineAudioDevice buffer to be used for the recorded side as well #

Patch Set 8 : Fixed compiler errors and changed audio parameters #

Patch Set 9 : Fixes compile issues and improves comments #

Patch Set 10 : Non trivial rebase #

Patch Set 11 : Fixes building error on Windows #

Patch Set 12 : Extended unit test for FineAudioBuffer with recorded data #

Total comments: 54

Patch Set 13 : First round of changes based on feedback from tkchin #

Patch Set 14 : Improved error handling and added support for BT headsets #

Total comments: 2

Patch Set 15 : Rebased and cleaned up #

Unified diffs Side-by-side diffs Delta from patch set Stats (+933 lines, -1120 lines) Patch
M talk/media/webrtc/webrtcvoiceengine.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +5 lines, -4 lines 0 comments Download
M webrtc/modules/audio_device/BUILD.gn View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
D webrtc/modules/audio_device/android/fine_audio_buffer.h View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -69 lines 0 comments Download
D webrtc/modules/audio_device/android/fine_audio_buffer.cc View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -89 lines 0 comments Download
D webrtc/modules/audio_device/android/fine_audio_buffer_unittest.cc View 1 2 3 4 1 chunk +0 lines, -106 lines 0 comments Download
M webrtc/modules/audio_device/android/opensles_player.cc View 1 2 3 4 5 6 7 8 9 3 chunks +4 lines, -3 lines 0 comments Download
M webrtc/modules/audio_device/audio_device.gypi View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
A webrtc/modules/audio_device/fine_audio_buffer.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +107 lines, -0 lines 0 comments Download
A webrtc/modules/audio_device/fine_audio_buffer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +150 lines, -0 lines 0 comments Download
A + webrtc/modules/audio_device/fine_audio_buffer_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +51 lines, -10 lines 0 comments Download
M webrtc/modules/audio_device/include/audio_device_defines.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +26 lines, -9 lines 0 comments Download
M webrtc/modules/audio_device/ios/audio_device_ios.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +144 lines, -98 lines 0 comments Download
M webrtc/modules/audio_device/ios/audio_device_ios.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 8 chunks +430 lines, -719 lines 0 comments Download
M webrtc/modules/audio_device/ios/audio_device_not_implemented_ios.mm View 1 2 3 4 5 6 1 chunk +6 lines, -0 lines 0 comments Download
M webrtc/modules/audio_device/ios/audio_device_unittest_ios.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +0 lines, -7 lines 0 comments Download
M webrtc/modules/audio_device/mock_audio_device_buffer.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +5 lines, -1 line 0 comments Download
M webrtc/modules/modules.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +1 line, -1 line 0 comments Download

Messages

Total messages: 28 (10 generated)
henrika_webrtc
tkchin: hope you like this one. Many thanks for reviewing ;-)
5 years, 4 months ago (2015-08-25 14:55:49 UTC) #2
henrika_webrtc
FYI, I was actually able to add support for a new recording structure (without the ...
5 years, 3 months ago (2015-08-26 16:09:25 UTC) #3
tkchin_webrtc
On 2015/08/26 16:09:25, henrika_webrtc wrote: > FYI, I was actually able to add support for ...
5 years, 3 months ago (2015-08-26 23:26:52 UTC) #4
henrika_webrtc
Should be OK now. Please review ;-) See https://code.google.com/p/webrtc/issues/detail?id=4954 for more details.
5 years, 3 months ago (2015-08-28 14:07:07 UTC) #8
tkchin_webrtc
Mostly nits, and a couple of n00b questions. https://codereview.webrtc.org/1254883002/diff/260001/webrtc/modules/audio_device/fine_audio_buffer.cc File webrtc/modules/audio_device/fine_audio_buffer.cc (right): https://codereview.webrtc.org/1254883002/diff/260001/webrtc/modules/audio_device/fine_audio_buffer.cc#newcode32 webrtc/modules/audio_device/fine_audio_buffer.cc:32: cached_bytes_(0), ...
5 years, 3 months ago (2015-09-01 20:54:51 UTC) #9
henrika_webrtc
Thanks! Done most of the changes but there might be some parts left. I have ...
5 years, 3 months ago (2015-09-03 13:44:42 UTC) #10
tkchin_webrtc
lgtm At the risk of sounding repetitive, please remove CHECK bits soon :) But I ...
5 years, 3 months ago (2015-09-04 05:29:16 UTC) #11
henrika_webrtc
Comments only. Will make one more round where I avoid crash on assert. https://codereview.webrtc.org/1254883002/diff/260001/webrtc/modules/audio_device/ios/audio_device_ios.h File ...
5 years, 3 months ago (2015-09-04 09:51:18 UTC) #12
henrika_webrtc
The current version no longer crashes when it hits an assert and I have also ...
5 years, 3 months ago (2015-09-04 14:43:44 UTC) #13
tkchin_webrtc
Really looking forward to this commit. Just one copyright issue now. https://codereview.webrtc.org/1254883002/diff/300001/webrtc/modules/audio_device/ios/audio_device_ios.mm File webrtc/modules/audio_device/ios/audio_device_ios.mm (right): ...
5 years, 3 months ago (2015-09-04 22:33:05 UTC) #14
henrika_webrtc
https://codereview.webrtc.org/1254883002/diff/300001/webrtc/modules/audio_device/ios/audio_device_ios.mm File webrtc/modules/audio_device/ios/audio_device_ios.mm (right): https://codereview.webrtc.org/1254883002/diff/300001/webrtc/modules/audio_device/ios/audio_device_ios.mm#newcode70 webrtc/modules/audio_device/ios/audio_device_ios.mm:70: // This utility class is taken from PublicUtility/CAXException.h. Thanks. ...
5 years, 3 months ago (2015-09-07 12:42:17 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1254883002/320001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1254883002/320001
5 years, 3 months ago (2015-09-07 12:42:39 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: presubmit on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/presubmit/builds/634)
5 years, 3 months ago (2015-09-07 12:49:05 UTC) #20
henrika_webrtc
+pbos: need your OK for talk/media/webrtc/webrtcvoiceengine.cc. Only trivial logging changes. Please check. Thanks :-)
5 years, 3 months ago (2015-09-07 12:57:53 UTC) #22
pbos-webrtc
lgtm for talk/
5 years, 3 months ago (2015-09-07 12:59:26 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1254883002/320001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1254883002/320001
5 years, 3 months ago (2015-09-07 12:59:59 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: android on tryserver.webrtc (JOB_TIMED_OUT, no build URL) android_arm64_rel on ...
5 years, 3 months ago (2015-09-07 13:06:49 UTC) #27
henrika_webrtc
5 years, 3 months ago (2015-09-07 14:10:17 UTC) #28
Message was sent while issue was closed.
Committed patchset #15 (id:320001) manually as
86d907cffda803ee34ee68f9833c1980d1b9f7a6 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698