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

Issue 2436033002: Replace AudioConferenceMixer with AudioMixer. (Closed)

Created:
4 years, 2 months ago by aleloi
Modified:
3 years, 9 months ago
Reviewers:
the sun, ossu
CC:
webrtc-reviews_webrtc.org, Andrew MacDonald, henrika_webrtc, stefan-webrtc, tlegrand-webrtc, tterriberry_mozilla.com, audio-team_agora.io, hlundin-webrtc, peah-webrtc, minyue-webrtc, mflodman
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Replace AudioConferenceMixer with AudioMixer. This CL re-routes audio through AudioMixer instead of AudioConferenceMixer. This is done without any modifications to VoiceEngine. Previously, output audio was polled by an AudioDevice through an AudioTransport pointer, which was an instance of VoEBaseImpl. VoiceEngineImpl sent the request for data on to OutputMixer and further to AudioConferenceMixer. This CL changes the audio flow to an AudioDevice. We reconfigure the AudioDevice to have another AudioTransport pointer, which points to an AudioTransportProxy. The AudioTransportProxy is responsible for feeding mixed data to the AudioProcessing component for echo cancellation, and to resample the audio data after AudioProcessing and before it is sent to the AudioDevice. The set up of the audio path was previously done during VoiceEngine initialization. Now it is changed in the AudioState constructor. This list shows where audio-path-related VoiceEngine functionality has been moved: OutputMixer --> AudioTransportProxy VoiceEngineImpl --> AudioState, AudioTransportProxy SharedData --> AudioState Channel --> AudioReceiveStream, ChannelProxy, Channel AudioState owns the new mixer and connects it to AudioTransport and AudioDevice on initialization. The audio input source is AudioReceiveStream, which registers itself with the mixer (which it gets from AudioState) on Start and Stop. # Since the AudioTransport interface contains non-const references. NOPRESUBMIT=True BUG=webrtc:6346 Committed: https://crrev.com/04c0722cf1fc38e6888ef44e413603e0cb461ea4 Cr-Commit-Position: refs/heads/master@{#15193}

Patch Set 1 : Tests pass (except for chromium mac which detects sample rate issue). #

Patch Set 2 : Added errors and logs to AudioTransport. #

Total comments: 47

Patch Set 3 : WebRTC tests will fail until the mix sample rate change has landed. #

Patch Set 4 : New mixer unit test. #

Patch Set 5 : forgot dependency. #

Total comments: 37

Patch Set 6 : Consistent thread checker, errcode handling in RecStream. #

Total comments: 15

Patch Set 7 : New ReceiveStream test and no fixture in AudioPath test. #

Total comments: 2

Patch Set 8 : Declare constants and depend on RemoveSource CL. #

Total comments: 10

Patch Set 9 : Correct struct member names, less code duplication in tests, minor fixes. #

Total comments: 8

Patch Set 10 : Added mock mixer, merged audio state tests. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+237 lines, -71 lines) Patch
M webrtc/audio/BUILD.gn View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -0 lines 0 comments Download
M webrtc/audio/DEPS View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M webrtc/audio/audio_receive_stream.h View 1 2 3 4 5 6 3 chunks +5 lines, -0 lines 0 comments Download
M webrtc/audio/audio_receive_stream.cc View 1 2 3 4 5 6 7 8 5 chunks +49 lines, -16 lines 0 comments Download
M webrtc/audio/audio_receive_stream_unittest.cc View 1 2 3 4 5 6 7 8 9 7 chunks +32 lines, -4 lines 0 comments Download
M webrtc/audio/audio_state_unittest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +94 lines, -41 lines 0 comments Download
M webrtc/audio/audio_transport_proxy.h View 1 2 3 4 5 2 chunks +7 lines, -1 line 0 comments Download
M webrtc/audio/audio_transport_proxy.cc View 1 2 3 4 5 6 7 8 9 3 chunks +46 lines, -9 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 95 (75 generated)
aleloi2
https://codereview.webrtc.org/2436033002/diff/1/webrtc/audio/audio_state.cc File webrtc/audio/audio_state.cc (right): https://codereview.webrtc.org/2436033002/diff/1/webrtc/audio/audio_state.cc#newcode27 webrtc/audio/audio_state.cc:27: audio_transport_proxy_(nullptr) { audio_transport_proxy_ initializer not needed: the unique ptr ...
4 years, 2 months ago (2016-10-20 21:24:59 UTC) #2
aleloi
https://codereview.chromium.org/2436033002/diff/160001/webrtc/audio/audio_receive_stream.cc File webrtc/audio/audio_receive_stream.cc (right): https://codereview.chromium.org/2436033002/diff/160001/webrtc/audio/audio_receive_stream.cc#newcode164 webrtc/audio/audio_receive_stream.cc:164: // to the old mixer. It will go away, ...
4 years, 2 months ago (2016-10-21 12:52:23 UTC) #11
aleloi
Hi! Here is a CL that finally connects the mixer and routes audio through it. ...
4 years, 1 month ago (2016-10-24 11:59:15 UTC) #20
ossu
https://codereview.webrtc.org/2436033002/diff/280001/webrtc/audio/audio_receive_stream.cc File webrtc/audio/audio_receive_stream.cc (right): https://codereview.webrtc.org/2436033002/diff/280001/webrtc/audio/audio_receive_stream.cc#newcode158 webrtc/audio/audio_receive_stream.cc:158: if (playing_) { Is this fine or does it ...
4 years, 1 month ago (2016-10-25 14:13:33 UTC) #23
the sun
That's looking pretty good - nice to see this happening! https://codereview.webrtc.org/2436033002/diff/280001/webrtc/audio/audio_receive_stream.cc File webrtc/audio/audio_receive_stream.cc (right): https://codereview.webrtc.org/2436033002/diff/280001/webrtc/audio/audio_receive_stream.cc#newcode157 ...
4 years, 1 month ago (2016-10-27 10:06:46 UTC) #24
aleloi
Hi! I've finally uploaded the next version. There are major changes: I've divided this CL ...
4 years, 1 month ago (2016-11-01 15:17:35 UTC) #31
the sun
https://codereview.webrtc.org/2436033002/diff/600001/webrtc/audio/audio_receive_stream.cc File webrtc/audio/audio_receive_stream.cc (right): https://codereview.webrtc.org/2436033002/diff/600001/webrtc/audio/audio_receive_stream.cc#newcode156 webrtc/audio/audio_receive_stream.cc:156: RTC_DCHECK_RUN_ON(&thread_checker_); I don't like that some methods in this ...
4 years, 1 month ago (2016-11-14 20:03:47 UTC) #61
aleloi
Responses to comments and new patch set. https://codereview.webrtc.org/2436033002/diff/600001/webrtc/audio/audio_receive_stream.cc File webrtc/audio/audio_receive_stream.cc (right): https://codereview.webrtc.org/2436033002/diff/600001/webrtc/audio/audio_receive_stream.cc#newcode156 webrtc/audio/audio_receive_stream.cc:156: RTC_DCHECK_RUN_ON(&thread_checker_); On ...
4 years, 1 month ago (2016-11-15 16:56:55 UTC) #66
the sun
https://codereview.webrtc.org/2436033002/diff/600001/webrtc/audio/audio_transport_proxy.cc File webrtc/audio/audio_transport_proxy.cc (right): https://codereview.webrtc.org/2436033002/diff/600001/webrtc/audio/audio_transport_proxy.cc#newcode18 webrtc/audio/audio_transport_proxy.cc:18: int Resample(const AudioFrame& frame, On 2016/11/15 16:56:54, aleloi wrote: ...
4 years, 1 month ago (2016-11-16 20:22:58 UTC) #67
the sun
On 2016/11/16 20:22:58, the sun wrote: > https://codereview.webrtc.org/2436033002/diff/600001/webrtc/audio/audio_transport_proxy.cc > File webrtc/audio/audio_transport_proxy.cc (right): > > https://codereview.webrtc.org/2436033002/diff/600001/webrtc/audio/audio_transport_proxy.cc#newcode18 ...
4 years, 1 month ago (2016-11-16 20:23:37 UTC) #68
aleloi
New version with fixtures removed and AudioReceiveState unit tests added. A dependent CL for fixing ...
4 years, 1 month ago (2016-11-17 18:12:26 UTC) #75
the sun
A few nits and one question - lgtm if fixed. https://codereview.webrtc.org/2436033002/diff/700001/webrtc/audio/audio_receive_stream.cc File webrtc/audio/audio_receive_stream.cc (right): https://codereview.webrtc.org/2436033002/diff/700001/webrtc/audio/audio_receive_stream.cc#newcode169 ...
4 years, 1 month ago (2016-11-18 16:30:17 UTC) #76
aleloi
New patch set. Issues fixed. Running all tests including chrome and internal projects now. https://codereview.webrtc.org/2436033002/diff/700001/webrtc/audio/audio_receive_stream.cc ...
4 years, 1 month ago (2016-11-21 11:59:11 UTC) #79
ossu
You're getting there! I only have a couple of minor issues. https://codereview.webrtc.org/2436033002/diff/720001/webrtc/audio/audio_receive_stream_unittest.cc File webrtc/audio/audio_receive_stream_unittest.cc (right): ...
4 years, 1 month ago (2016-11-21 17:07:32 UTC) #82
the sun
https://codereview.webrtc.org/2436033002/diff/720001/webrtc/audio/audio_state_audio_path_unittest.cc File webrtc/audio/audio_state_audio_path_unittest.cc (right): https://codereview.webrtc.org/2436033002/diff/720001/webrtc/audio/audio_state_audio_path_unittest.cc#newcode62 webrtc/audio/audio_state_audio_path_unittest.cc:62: MockVoiceEngine& voice_engine() { return mock_voice_engine; } nit: this doesn't ...
4 years, 1 month ago (2016-11-22 08:47:45 UTC) #83
aleloi
Hi! I've added another patch set. Do you think there is something particular to keep ...
4 years, 1 month ago (2016-11-22 13:23:40 UTC) #84
ossu
LGTM. Always look both ways before landing!
4 years, 1 month ago (2016-11-22 13:27:51 UTC) #85
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2436033002/740001
4 years, 1 month ago (2016-11-22 14:25:03 UTC) #90
commit-bot: I haz the power
Committed patchset #10 (id:740001)
4 years, 1 month ago (2016-11-22 14:42:59 UTC) #93
commit-bot: I haz the power
4 years, 1 month ago (2016-11-22 14:43:05 UTC) #95
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/04c0722cf1fc38e6888ef44e413603e0cb461ea4
Cr-Commit-Position: refs/heads/master@{#15193}

Powered by Google App Engine
This is Rietveld 408576698