|
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
Total comments: 54
Total comments: 2
|
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
|
Total messages: 28 (10 generated)
|