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

Issue 2458703002: Changed mixing to be done at the minimal possible frequency. (Closed)

Created:
4 years, 1 month ago by aleloi
Modified:
4 years, 1 month ago
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com, hlundin-webrtc
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Changed mixing to be done at the minimal possible frequency. This change changes mixing to be done at the lowest possible APM-native rate that does not lead to quality loss. An Audio Processing-native rate is one of 8, 16, 32, or 48 kHz. Mixing at a lower sampling rate and avoiding resampling can in many cases lead to big efficiency improvements, as reported by experiments. This CL also fixes a design issue with the AudioMixer: audio at non-native rates is no longer fed to the APM instance which is the limiter. NOTRY=True BUG=webrtc:6346 Committed: https://crrev.com/95611837087e57f59ece87f02b9479e58c6904e8 Cr-Commit-Position: refs/heads/master@{#14980}

Patch Set 1 : Changed name NeededFrequncy -> PreferredSampleRate to match upstream change #

Total comments: 3

Patch Set 2 : Shorter lambda expression. #

Total comments: 10

Patch Set 3 : pointer to const -> const reference, added comment in api. #

Total comments: 5

Patch Set 4 : Added test with multiple participants. #

Total comments: 5

Patch Set 5 : Static constexpr array. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+131 lines, -28 lines) Patch
M webrtc/api/audio/audio_mixer.h View 1 2 1 chunk +7 lines, -5 lines 0 comments Download
M webrtc/modules/audio_mixer/audio_mixer_impl.h View 1 chunk +1 line, -2 lines 0 comments Download
M webrtc/modules/audio_mixer/audio_mixer_impl.cc View 1 2 3 4 2 chunks +32 lines, -2 lines 0 comments Download
M webrtc/modules/audio_mixer/audio_mixer_impl_unittest.cc View 1 2 3 4 11 chunks +91 lines, -19 lines 0 comments Download

Messages

Total messages: 37 (16 generated)
aleloi
Hi! Can you take a look at this? The code change is something like ~40 ...
4 years, 1 month ago (2016-10-31 10:39:36 UTC) #7
hlundin-webrtc
https://codereview.webrtc.org/2458703002/diff/100001/webrtc/api/audio/audio_mixer.h File webrtc/api/audio/audio_mixer.h (right): https://codereview.webrtc.org/2458703002/diff/100001/webrtc/api/audio/audio_mixer.h#newcode67 webrtc/api/audio/audio_mixer.h:67: // updated. Will the implementation have to provide the ...
4 years, 1 month ago (2016-10-31 14:14:57 UTC) #10
aleloi
https://codereview.webrtc.org/2458703002/diff/100001/webrtc/api/audio/audio_mixer.h File webrtc/api/audio/audio_mixer.h (right): https://codereview.webrtc.org/2458703002/diff/100001/webrtc/api/audio/audio_mixer.h#newcode67 webrtc/api/audio/audio_mixer.h:67: // updated. On 2016/10/31 14:14:56, hlundin-webrtc wrote: > Will ...
4 years, 1 month ago (2016-10-31 14:35:57 UTC) #11
hlundin-webrtc
lgtm https://codereview.webrtc.org/2458703002/diff/100001/webrtc/modules/audio_mixer/audio_mixer_impl.cc File webrtc/modules/audio_mixer/audio_mixer_impl.cc (right): https://codereview.webrtc.org/2458703002/diff/100001/webrtc/modules/audio_mixer/audio_mixer_impl.cc#newcode162 webrtc/modules/audio_mixer/audio_mixer_impl.cc:162: RTC_DCHECK(rounded_up_index != native_rates.end()); On 2016/10/31 14:35:57, aleloi wrote: ...
4 years, 1 month ago (2016-10-31 15:24:11 UTC) #12
ivoc
Nice work. I think it would be good to add a test that has multiple ...
4 years, 1 month ago (2016-10-31 15:39:35 UTC) #13
hlundin-webrtc
https://codereview.webrtc.org/2458703002/diff/80001/webrtc/modules/audio_mixer/audio_mixer_impl.cc File webrtc/modules/audio_mixer/audio_mixer_impl.cc (right): https://codereview.webrtc.org/2458703002/diff/80001/webrtc/modules/audio_mixer/audio_mixer_impl.cc#newcode152 webrtc/modules/audio_mixer/audio_mixer_impl.cc:152: RTC_DCHECK_LE(APM::kSampleRate8kHz, source_needed_frequency); On 2016/10/31 15:39:34, ivoc wrote: > To ...
4 years, 1 month ago (2016-10-31 15:48:26 UTC) #14
the sun
lgtm % comments https://codereview.webrtc.org/2458703002/diff/120001/webrtc/modules/audio_mixer/audio_mixer_impl.cc File webrtc/modules/audio_mixer/audio_mixer_impl.cc (right): https://codereview.webrtc.org/2458703002/diff/120001/webrtc/modules/audio_mixer/audio_mixer_impl.cc#newcode153 webrtc/modules/audio_mixer/audio_mixer_impl.cc:153: RTC_DCHECK_LE(source_needed_frequency, APM::kSampleRate48kHz); nit: _GE and switch ...
4 years, 1 month ago (2016-11-01 08:51:29 UTC) #15
hlundin-webrtc
https://codereview.webrtc.org/2458703002/diff/120001/webrtc/modules/audio_mixer/audio_mixer_impl.cc File webrtc/modules/audio_mixer/audio_mixer_impl.cc (right): https://codereview.webrtc.org/2458703002/diff/120001/webrtc/modules/audio_mixer/audio_mixer_impl.cc#newcode153 webrtc/modules/audio_mixer/audio_mixer_impl.cc:153: RTC_DCHECK_LE(source_needed_frequency, APM::kSampleRate48kHz); On 2016/11/01 08:51:29, the sun wrote: > ...
4 years, 1 month ago (2016-11-01 09:32:33 UTC) #16
aleloi
https://codereview.webrtc.org/2458703002/diff/120001/webrtc/modules/audio_mixer/audio_mixer_impl.cc File webrtc/modules/audio_mixer/audio_mixer_impl.cc (right): https://codereview.webrtc.org/2458703002/diff/120001/webrtc/modules/audio_mixer/audio_mixer_impl.cc#newcode220 webrtc/modules/audio_mixer/audio_mixer_impl.cc:220: const int sample_rate = [&]() { On 2016/11/01 08:51:29, ...
4 years, 1 month ago (2016-11-01 10:29:00 UTC) #17
the sun
On 2016/11/01 10:29:00, aleloi wrote: > https://codereview.webrtc.org/2458703002/diff/120001/webrtc/modules/audio_mixer/audio_mixer_impl.cc > File webrtc/modules/audio_mixer/audio_mixer_impl.cc (right): > > https://codereview.webrtc.org/2458703002/diff/120001/webrtc/modules/audio_mixer/audio_mixer_impl.cc#newcode220 > ...
4 years, 1 month ago (2016-11-01 11:09:56 UTC) #18
aleloi
On 2016/11/01 11:09:56, the sun wrote: > On 2016/11/01 10:29:00, aleloi wrote: > > > ...
4 years, 1 month ago (2016-11-01 11:41:19 UTC) #19
aleloi
I realized I need a reviewer who owns webrtc/api. kwiberg@, can you look at the ...
4 years, 1 month ago (2016-11-08 12:03:48 UTC) #21
kwiberg-webrtc
lgtm for webrtc/api/ https://codereview.webrtc.org/2458703002/diff/140001/webrtc/modules/audio_mixer/audio_mixer_impl.cc File webrtc/modules/audio_mixer/audio_mixer_impl.cc (right): https://codereview.webrtc.org/2458703002/diff/140001/webrtc/modules/audio_mixer/audio_mixer_impl.cc#newcode159 webrtc/modules/audio_mixer/audio_mixer_impl.cc:159: APM::kSampleRate48kHz}; Why is this a std::vector ...
4 years, 1 month ago (2016-11-08 12:34:04 UTC) #22
aleloi
https://codereview.webrtc.org/2458703002/diff/140001/webrtc/modules/audio_mixer/audio_mixer_impl.cc File webrtc/modules/audio_mixer/audio_mixer_impl.cc (right): https://codereview.webrtc.org/2458703002/diff/140001/webrtc/modules/audio_mixer/audio_mixer_impl.cc#newcode159 webrtc/modules/audio_mixer/audio_mixer_impl.cc:159: APM::kSampleRate48kHz}; On 2016/11/08 12:34:03, kwiberg-webrtc wrote: > Why is ...
4 years, 1 month ago (2016-11-08 12:52:23 UTC) #23
kwiberg-webrtc
lgtm https://codereview.webrtc.org/2458703002/diff/140001/webrtc/modules/audio_mixer/audio_mixer_impl.cc File webrtc/modules/audio_mixer/audio_mixer_impl.cc (right): https://codereview.webrtc.org/2458703002/diff/140001/webrtc/modules/audio_mixer/audio_mixer_impl.cc#newcode162 webrtc/modules/audio_mixer/audio_mixer_impl.cc:162: RTC_DCHECK(rounded_up_index != native_rates.end()); On 2016/11/08 12:52:22, aleloi wrote: ...
4 years, 1 month ago (2016-11-08 13:18:07 UTC) #24
ivoc
On 2016/11/08 13:18:07, kwiberg-webrtc wrote: > lgtm > > https://codereview.webrtc.org/2458703002/diff/140001/webrtc/modules/audio_mixer/audio_mixer_impl.cc > File webrtc/modules/audio_mixer/audio_mixer_impl.cc (right): > ...
4 years, 1 month ago (2016-11-08 13:27:40 UTC) #25
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/2458703002/160001
4 years, 1 month ago (2016-11-08 13:31:09 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: mac_baremetal on master.tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/mac_baremetal/builds/15955)
4 years, 1 month ago (2016-11-08 13:42:41 UTC) #30
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/2458703002/160001
4 years, 1 month ago (2016-11-08 14:38:36 UTC) #33
commit-bot: I haz the power
Committed patchset #5 (id:160001)
4 years, 1 month ago (2016-11-08 14:39:54 UTC) #35
commit-bot: I haz the power
4 years, 1 month ago (2016-11-08 14:40:03 UTC) #37
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/95611837087e57f59ece87f02b9479e58c6904e8
Cr-Commit-Position: refs/heads/master@{#14980}

Powered by Google App Engine
This is Rietveld 408576698