blob: 3fcd3e3c66a8d4bc957ceb6bf46787b036c72c67 [file] [log] [blame]
aleloi77ad3942016-07-04 06:33:02 -07001/*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
aleloi5d167d62016-08-24 02:20:54 -070011#include "webrtc/modules/audio_mixer/audio_mixer_impl.h"
aleloi77ad3942016-07-04 06:33:02 -070012
13#include <algorithm>
aleloif3882572016-07-29 02:12:41 -070014#include <functional>
aleloi311525e2016-09-07 06:13:12 -070015#include <utility>
aleloi77ad3942016-07-04 06:33:02 -070016
aleloi36542512016-10-07 05:28:32 -070017#include "webrtc/base/logging.h"
aleloi5bcc00e2016-08-15 03:01:31 -070018#include "webrtc/modules/audio_mixer/audio_frame_manipulator.h"
aleloi77ad3942016-07-04 06:33:02 -070019#include "webrtc/modules/utility/include/audio_frame_operations.h"
aleloi77ad3942016-07-04 06:33:02 -070020
21namespace webrtc {
22namespace {
23
aleloi4b8bfb82016-10-12 02:14:59 -070024struct SourceFrame {
25 SourceFrame(AudioMixerImpl::SourceStatus* source_status,
aleloi36542512016-10-07 05:28:32 -070026 AudioFrame* audio_frame,
27 bool muted)
aleloi4b8bfb82016-10-12 02:14:59 -070028 : source_status(source_status), audio_frame(audio_frame), muted(muted) {
29 RTC_DCHECK(source_status);
30 RTC_DCHECK(audio_frame);
31 if (!muted) {
32 energy = AudioMixerCalculateEnergy(*audio_frame);
aleloif3882572016-07-29 02:12:41 -070033 }
34 }
aleloi77ad3942016-07-04 06:33:02 -070035
aleloi4b8bfb82016-10-12 02:14:59 -070036 SourceFrame(AudioMixerImpl::SourceStatus* source_status,
aleloi36542512016-10-07 05:28:32 -070037 AudioFrame* audio_frame,
38 bool muted,
aleloi652ac892016-09-07 07:42:14 -070039 uint32_t energy)
aleloi4b8bfb82016-10-12 02:14:59 -070040 : source_status(source_status),
41 audio_frame(audio_frame),
42 muted(muted),
43 energy(energy) {
44 RTC_DCHECK(source_status);
45 RTC_DCHECK(audio_frame);
aleloif3882572016-07-29 02:12:41 -070046 }
47
aleloi4b8bfb82016-10-12 02:14:59 -070048 AudioMixerImpl::SourceStatus* source_status = nullptr;
49 AudioFrame* audio_frame = nullptr;
50 bool muted = true;
51 uint32_t energy = 0;
aleloif3882572016-07-29 02:12:41 -070052};
tereliusea4c1412016-07-29 01:36:14 -070053
aleloi4b8bfb82016-10-12 02:14:59 -070054// ShouldMixBefore(a, b) is used to select mixer sources.
55bool ShouldMixBefore(const SourceFrame& a, const SourceFrame& b) {
56 if (a.muted != b.muted) {
57 return b.muted;
58 }
aleloi44968092016-08-08 10:18:58 -070059
aleloi4b8bfb82016-10-12 02:14:59 -070060 const auto a_activity = a.audio_frame->vad_activity_;
61 const auto b_activity = b.audio_frame->vad_activity_;
62
63 if (a_activity != b_activity) {
64 return a_activity == AudioFrame::kVadActive;
65 }
66
67 return a.energy > b.energy;
68}
69
70void RampAndUpdateGain(
71 const std::vector<SourceFrame>& mixed_sources_and_frames) {
aleloi652ac892016-09-07 07:42:14 -070072 for (const auto& source_frame : mixed_sources_and_frames) {
aleloi4b8bfb82016-10-12 02:14:59 -070073 float target_gain = source_frame.source_status->is_mixed ? 1.0f : 0.0f;
74 Ramp(source_frame.source_status->gain, target_gain,
75 source_frame.audio_frame);
76 source_frame.source_status->gain = target_gain;
aleloi77ad3942016-07-04 06:33:02 -070077 }
aleloi77ad3942016-07-04 06:33:02 -070078}
79
aleloidc7669a2016-10-04 04:06:20 -070080// Mix the AudioFrames stored in audioFrameList into mixed_audio.
81int32_t MixFromList(AudioFrame* mixed_audio,
82 const AudioFrameList& audio_frame_list,
aleloidc7669a2016-10-04 04:06:20 -070083 bool use_limiter) {
aleloie97974d2016-10-12 03:06:09 -070084 if (audio_frame_list.empty()) {
aleloidc7669a2016-10-04 04:06:20 -070085 return 0;
aleloie97974d2016-10-12 03:06:09 -070086 }
aleloi77ad3942016-07-04 06:33:02 -070087
aleloidc7669a2016-10-04 04:06:20 -070088 if (audio_frame_list.size() == 1) {
89 mixed_audio->timestamp_ = audio_frame_list.front()->timestamp_;
90 mixed_audio->elapsed_time_ms_ = audio_frame_list.front()->elapsed_time_ms_;
91 } else {
92 // TODO(wu): Issue 3390.
93 // Audio frame timestamp is only supported in one channel case.
94 mixed_audio->timestamp_ = 0;
95 mixed_audio->elapsed_time_ms_ = -1;
96 }
aleloi77ad3942016-07-04 06:33:02 -070097
aleloidc7669a2016-10-04 04:06:20 -070098 for (const auto& frame : audio_frame_list) {
99 RTC_DCHECK_EQ(mixed_audio->sample_rate_hz_, frame->sample_rate_hz_);
100 RTC_DCHECK_EQ(
101 frame->samples_per_channel_,
102 static_cast<size_t>((mixed_audio->sample_rate_hz_ *
103 webrtc::AudioMixerImpl::kFrameDurationInMs) /
104 1000));
aleloi77ad3942016-07-04 06:33:02 -0700105
aleloidc7669a2016-10-04 04:06:20 -0700106 // Mix |f.frame| into |mixed_audio|, with saturation protection.
107 // These effect is applied to |f.frame| itself prior to mixing.
108 if (use_limiter) {
109 // Divide by two to avoid saturation in the mixing.
110 // This is only meaningful if the limiter will be used.
111 *frame >>= 1;
112 }
113 RTC_DCHECK_EQ(frame->num_channels_, mixed_audio->num_channels_);
114 *mixed_audio += *frame;
115 }
aleloi77ad3942016-07-04 06:33:02 -0700116 return 0;
117}
118
aleloi4b8bfb82016-10-12 02:14:59 -0700119AudioMixerImpl::SourceStatusList::const_iterator FindSourceInList(
aleloie8914152016-10-11 06:18:31 -0700120 AudioMixerImpl::Source const* audio_source,
aleloi4b8bfb82016-10-12 02:14:59 -0700121 AudioMixerImpl::SourceStatusList const* audio_source_list) {
aleloi36542512016-10-07 05:28:32 -0700122 return std::find_if(audio_source_list->begin(), audio_source_list->end(),
aleloi4b8bfb82016-10-12 02:14:59 -0700123 [audio_source](const AudioMixerImpl::SourceStatus& p) {
124 return p.audio_source == audio_source;
aleloi36542512016-10-07 05:28:32 -0700125 });
126}
127
aleloie97974d2016-10-12 03:06:09 -0700128// TODO(aleloi): remove non-const version when WEBRTC only supports modern STL.
aleloi4b8bfb82016-10-12 02:14:59 -0700129AudioMixerImpl::SourceStatusList::iterator FindSourceInList(
aleloie8914152016-10-11 06:18:31 -0700130 AudioMixerImpl::Source const* audio_source,
aleloi4b8bfb82016-10-12 02:14:59 -0700131 AudioMixerImpl::SourceStatusList* audio_source_list) {
aleloi36542512016-10-07 05:28:32 -0700132 return std::find_if(audio_source_list->begin(), audio_source_list->end(),
aleloi4b8bfb82016-10-12 02:14:59 -0700133 [audio_source](const AudioMixerImpl::SourceStatus& p) {
134 return p.audio_source == audio_source;
aleloi36542512016-10-07 05:28:32 -0700135 });
136}
137
aleloidc7669a2016-10-04 04:06:20 -0700138} // namespace
aleloi77ad3942016-07-04 06:33:02 -0700139
aleloie97974d2016-10-12 03:06:09 -0700140AudioMixerImpl::AudioMixerImpl(std::unique_ptr<AudioProcessing> limiter)
141 : audio_source_list_(),
aleloi77ad3942016-07-04 06:33:02 -0700142 use_limiter_(true),
aleloi311525e2016-09-07 06:13:12 -0700143 time_stamp_(0),
144 limiter_(std::move(limiter)) {
145 SetOutputFrequency(kDefaultFrequency);
aleloia0db81f2016-07-28 06:36:22 -0700146}
aleloi77ad3942016-07-04 06:33:02 -0700147
aleloi5d167d62016-08-24 02:20:54 -0700148AudioMixerImpl::~AudioMixerImpl() {}
aleloi70f866c2016-08-16 02:15:49 -0700149
aleloi116ec6d2016-10-12 06:07:07 -0700150rtc::scoped_refptr<AudioMixerImpl> AudioMixerImpl::Create() {
aleloi77ad3942016-07-04 06:33:02 -0700151 Config config;
152 config.Set<ExperimentalAgc>(new ExperimentalAgc(false));
aleloi311525e2016-09-07 06:13:12 -0700153 std::unique_ptr<AudioProcessing> limiter(AudioProcessing::Create(config));
aleloie97974d2016-10-12 03:06:09 -0700154 if (!limiter.get()) {
aleloi311525e2016-09-07 06:13:12 -0700155 return nullptr;
aleloie97974d2016-10-12 03:06:09 -0700156 }
aleloi77ad3942016-07-04 06:33:02 -0700157
aleloi311525e2016-09-07 06:13:12 -0700158 if (limiter->gain_control()->set_mode(GainControl::kFixedDigital) !=
aleloie97974d2016-10-12 03:06:09 -0700159 limiter->kNoError) {
aleloi311525e2016-09-07 06:13:12 -0700160 return nullptr;
aleloie97974d2016-10-12 03:06:09 -0700161 }
aleloi77ad3942016-07-04 06:33:02 -0700162
163 // We smoothly limit the mixed frame to -7 dbFS. -6 would correspond to the
164 // divide-by-2 but -7 is used instead to give a bit of headroom since the
165 // AGC is not a hard limiter.
aleloie97974d2016-10-12 03:06:09 -0700166 if (limiter->gain_control()->set_target_level_dbfs(7) != limiter->kNoError) {
aleloi311525e2016-09-07 06:13:12 -0700167 return nullptr;
aleloie97974d2016-10-12 03:06:09 -0700168 }
aleloi77ad3942016-07-04 06:33:02 -0700169
aleloie97974d2016-10-12 03:06:09 -0700170 if (limiter->gain_control()->set_compression_gain_db(0) !=
171 limiter->kNoError) {
aleloi311525e2016-09-07 06:13:12 -0700172 return nullptr;
aleloie97974d2016-10-12 03:06:09 -0700173 }
aleloi77ad3942016-07-04 06:33:02 -0700174
aleloie97974d2016-10-12 03:06:09 -0700175 if (limiter->gain_control()->enable_limiter(true) != limiter->kNoError) {
aleloi311525e2016-09-07 06:13:12 -0700176 return nullptr;
aleloie97974d2016-10-12 03:06:09 -0700177 }
aleloi77ad3942016-07-04 06:33:02 -0700178
aleloie97974d2016-10-12 03:06:09 -0700179 if (limiter->gain_control()->Enable(true) != limiter->kNoError) {
aleloi311525e2016-09-07 06:13:12 -0700180 return nullptr;
aleloie97974d2016-10-12 03:06:09 -0700181 }
aleloi77ad3942016-07-04 06:33:02 -0700182
aleloi116ec6d2016-10-12 06:07:07 -0700183 return rtc::scoped_refptr<AudioMixerImpl>(
184 new rtc::RefCountedObject<AudioMixerImpl>(std::move(limiter)));
aleloi77ad3942016-07-04 06:33:02 -0700185}
186
aleloi5d167d62016-08-24 02:20:54 -0700187void AudioMixerImpl::Mix(int sample_rate,
188 size_t number_of_channels,
189 AudioFrame* audio_frame_for_mixing) {
aleloi44968092016-08-08 10:18:58 -0700190 RTC_DCHECK(number_of_channels == 1 || number_of_channels == 2);
aleloi920d30b2016-10-20 14:23:24 -0700191 RTC_DCHECK_RUNS_SERIALIZED(&race_checker_);
aleloi311525e2016-09-07 06:13:12 -0700192
aleloi311525e2016-09-07 06:13:12 -0700193 if (OutputFrequency() != sample_rate) {
aleloie97974d2016-10-12 03:06:09 -0700194 SetOutputFrequency(sample_rate);
aleloi311525e2016-09-07 06:13:12 -0700195 }
196
aleloi652ac892016-09-07 07:42:14 -0700197 AudioFrameList mix_list;
aleloi77ad3942016-07-04 06:33:02 -0700198 {
aleloi311525e2016-09-07 06:13:12 -0700199 rtc::CritScope lock(&crit_);
aleloi116ec6d2016-10-12 06:07:07 -0700200 mix_list = GetAudioFromSources();
aleloi77ad3942016-07-04 06:33:02 -0700201 }
202
aleloi652ac892016-09-07 07:42:14 -0700203 for (const auto& frame : mix_list) {
aleloie8914152016-10-11 06:18:31 -0700204 RemixFrame(number_of_channels, frame);
aleloi44968092016-08-08 10:18:58 -0700205 }
aleloi09f45102016-07-28 03:52:15 -0700206
207 audio_frame_for_mixing->UpdateFrame(
aleloia4c21062016-09-08 01:25:46 -0700208 -1, time_stamp_, NULL, 0, OutputFrequency(), AudioFrame::kNormalSpeech,
aleloi44968092016-08-08 10:18:58 -0700209 AudioFrame::kVadPassive, number_of_channels);
aleloi09f45102016-07-28 03:52:15 -0700210
aleloi6382a192016-08-08 10:25:04 -0700211 time_stamp_ += static_cast<uint32_t>(sample_size_);
aleloi09f45102016-07-28 03:52:15 -0700212
aleloi116ec6d2016-10-12 06:07:07 -0700213 use_limiter_ = mix_list.size() > 1;
aleloi09f45102016-07-28 03:52:15 -0700214
aleloi652ac892016-09-07 07:42:14 -0700215 // We only use the limiter if we're actually mixing multiple streams.
aleloie97974d2016-10-12 03:06:09 -0700216 MixFromList(audio_frame_for_mixing, mix_list, use_limiter_);
aleloi652ac892016-09-07 07:42:14 -0700217
aleloi311525e2016-09-07 06:13:12 -0700218 if (audio_frame_for_mixing->samples_per_channel_ == 0) {
219 // Nothing was mixed, set the audio samples to silence.
220 audio_frame_for_mixing->samples_per_channel_ = sample_size_;
221 audio_frame_for_mixing->Mute();
222 } else {
223 // Only call the limiter if we have something to mix.
224 LimitMixedAudio(audio_frame_for_mixing);
aleloi77ad3942016-07-04 06:33:02 -0700225 }
aleloi616df1e2016-08-24 01:17:12 -0700226
aleloi77ad3942016-07-04 06:33:02 -0700227 return;
228}
229
aleloie97974d2016-10-12 03:06:09 -0700230void AudioMixerImpl::SetOutputFrequency(int frequency) {
aleloi920d30b2016-10-20 14:23:24 -0700231 RTC_DCHECK_RUNS_SERIALIZED(&race_checker_);
aleloi6382a192016-08-08 10:25:04 -0700232 output_frequency_ = frequency;
aleloidc7669a2016-10-04 04:06:20 -0700233 sample_size_ = (output_frequency_ * kFrameDurationInMs) / 1000;
aleloi77ad3942016-07-04 06:33:02 -0700234}
235
aleloie97974d2016-10-12 03:06:09 -0700236int AudioMixerImpl::OutputFrequency() const {
aleloi920d30b2016-10-20 14:23:24 -0700237 RTC_DCHECK_RUNS_SERIALIZED(&race_checker_);
aleloi6382a192016-08-08 10:25:04 -0700238 return output_frequency_;
aleloi77ad3942016-07-04 06:33:02 -0700239}
240
aleloi116ec6d2016-10-12 06:07:07 -0700241bool AudioMixerImpl::AddSource(Source* audio_source) {
242 RTC_DCHECK(audio_source);
243 rtc::CritScope lock(&crit_);
244 RTC_DCHECK(FindSourceInList(audio_source, &audio_source_list_) ==
245 audio_source_list_.end())
246 << "Source already added to mixer";
247 audio_source_list_.emplace_back(audio_source, false, 0);
248 return true;
aleloi77ad3942016-07-04 06:33:02 -0700249}
250
aleloi116ec6d2016-10-12 06:07:07 -0700251bool AudioMixerImpl::RemoveSource(Source* audio_source) {
252 RTC_DCHECK(audio_source);
253 rtc::CritScope lock(&crit_);
254 const auto iter = FindSourceInList(audio_source, &audio_source_list_);
255 RTC_DCHECK(iter != audio_source_list_.end()) << "Source not present in mixer";
256 audio_source_list_.erase(iter);
257 return true;
258}
aleloi77ad3942016-07-04 06:33:02 -0700259
aleloi116ec6d2016-10-12 06:07:07 -0700260AudioFrameList AudioMixerImpl::GetAudioFromSources() {
aleloi920d30b2016-10-20 14:23:24 -0700261 RTC_DCHECK_RUNS_SERIALIZED(&race_checker_);
aleloif3882572016-07-29 02:12:41 -0700262 AudioFrameList result;
aleloia4c21062016-09-08 01:25:46 -0700263 std::vector<SourceFrame> audio_source_mixing_data_list;
aleloi652ac892016-09-07 07:42:14 -0700264 std::vector<SourceFrame> ramp_list;
aleloi77ad3942016-07-04 06:33:02 -0700265
aleloif3882572016-07-29 02:12:41 -0700266 // Get audio source audio and put it in the struct vector.
aleloi36542512016-10-07 05:28:32 -0700267 for (auto& source_and_status : audio_source_list_) {
268 auto audio_frame_with_info =
aleloi4b8bfb82016-10-12 02:14:59 -0700269 source_and_status.audio_source->GetAudioFrameWithInfo(
aleloie97974d2016-10-12 03:06:09 -0700270 static_cast<int>(OutputFrequency()));
aleloi77ad3942016-07-04 06:33:02 -0700271
aleloia4c21062016-09-08 01:25:46 -0700272 const auto audio_frame_info = audio_frame_with_info.audio_frame_info;
aleloif3882572016-07-29 02:12:41 -0700273 AudioFrame* audio_source_audio_frame = audio_frame_with_info.audio_frame;
274
aleloie8914152016-10-11 06:18:31 -0700275 if (audio_frame_info == Source::AudioFrameInfo::kError) {
aleloie97974d2016-10-12 03:06:09 -0700276 LOG_F(LS_WARNING) << "failed to GetAudioFrameWithInfo() from source";
tereliusea4c1412016-07-29 01:36:14 -0700277 continue;
278 }
aleloia4c21062016-09-08 01:25:46 -0700279 audio_source_mixing_data_list.emplace_back(
aleloi36542512016-10-07 05:28:32 -0700280 &source_and_status, audio_source_audio_frame,
aleloie8914152016-10-11 06:18:31 -0700281 audio_frame_info == Source::AudioFrameInfo::kMuted);
aleloif3882572016-07-29 02:12:41 -0700282 }
283
284 // Sort frames by sorting function.
aleloia4c21062016-09-08 01:25:46 -0700285 std::sort(audio_source_mixing_data_list.begin(),
aleloi4b8bfb82016-10-12 02:14:59 -0700286 audio_source_mixing_data_list.end(), ShouldMixBefore);
aleloif3882572016-07-29 02:12:41 -0700287
aleloia4c21062016-09-08 01:25:46 -0700288 int max_audio_frame_counter = kMaximumAmountOfMixedAudioSources;
289
290 // Go through list in order and put unmuted frames in result list.
aleloi36542512016-10-07 05:28:32 -0700291 for (const auto& p : audio_source_mixing_data_list) {
aleloif3882572016-07-29 02:12:41 -0700292 // Filter muted.
aleloi4b8bfb82016-10-12 02:14:59 -0700293 if (p.muted) {
294 p.source_status->is_mixed = false;
aleloif3882572016-07-29 02:12:41 -0700295 continue;
tereliusea4c1412016-07-29 01:36:14 -0700296 }
aleloi2942e242016-07-29 01:23:49 -0700297
aleloif3882572016-07-29 02:12:41 -0700298 // Add frame to result vector for mixing.
299 bool is_mixed = false;
aleloia4c21062016-09-08 01:25:46 -0700300 if (max_audio_frame_counter > 0) {
301 --max_audio_frame_counter;
aleloi4b8bfb82016-10-12 02:14:59 -0700302 result.push_back(p.audio_frame);
303 ramp_list.emplace_back(p.source_status, p.audio_frame, false, -1);
aleloif3882572016-07-29 02:12:41 -0700304 is_mixed = true;
tereliusea4c1412016-07-29 01:36:14 -0700305 }
aleloi4b8bfb82016-10-12 02:14:59 -0700306 p.source_status->is_mixed = is_mixed;
tereliusea4c1412016-07-29 01:36:14 -0700307 }
aleloi4b8bfb82016-10-12 02:14:59 -0700308 RampAndUpdateGain(ramp_list);
aleloif3882572016-07-29 02:12:41 -0700309 return result;
aleloi77ad3942016-07-04 06:33:02 -0700310}
311
aleloi77ad3942016-07-04 06:33:02 -0700312
aleloia4c21062016-09-08 01:25:46 -0700313bool AudioMixerImpl::LimitMixedAudio(AudioFrame* mixed_audio) const {
aleloi920d30b2016-10-20 14:23:24 -0700314 RTC_DCHECK_RUNS_SERIALIZED(&race_checker_);
aleloi77ad3942016-07-04 06:33:02 -0700315 if (!use_limiter_) {
316 return true;
317 }
318
319 // Smoothly limit the mixed frame.
aleloia4c21062016-09-08 01:25:46 -0700320 const int error = limiter_->ProcessStream(mixed_audio);
aleloi77ad3942016-07-04 06:33:02 -0700321
322 // And now we can safely restore the level. This procedure results in
323 // some loss of resolution, deemed acceptable.
324 //
325 // It's possible to apply the gain in the AGC (with a target level of 0 dbFS
326 // and compression gain of 6 dB). However, in the transition frame when this
aleloi09f45102016-07-28 03:52:15 -0700327 // is enabled (moving from one to two audio sources) it has the potential to
aleloi77ad3942016-07-04 06:33:02 -0700328 // create discontinuities in the mixed frame.
329 //
330 // Instead we double the frame (with addition since left-shifting a
331 // negative value is undefined).
aleloia4c21062016-09-08 01:25:46 -0700332 *mixed_audio += *mixed_audio;
aleloi77ad3942016-07-04 06:33:02 -0700333
aleloi6382a192016-08-08 10:25:04 -0700334 if (error != limiter_->kNoError) {
aleloie97974d2016-10-12 03:06:09 -0700335 LOG_F(LS_ERROR) << "Error from AudioProcessing: " << error;
aleloi09f45102016-07-28 03:52:15 -0700336 RTC_NOTREACHED();
aleloi77ad3942016-07-04 06:33:02 -0700337 return false;
338 }
339 return true;
340}
aleloi616df1e2016-08-24 01:17:12 -0700341
aleloi36542512016-10-07 05:28:32 -0700342bool AudioMixerImpl::GetAudioSourceMixabilityStatusForTest(
aleloie97974d2016-10-12 03:06:09 -0700343 AudioMixerImpl::Source* audio_source) const {
aleloi920d30b2016-10-20 14:23:24 -0700344 RTC_DCHECK_RUNS_SERIALIZED(&race_checker_);
aleloi36542512016-10-07 05:28:32 -0700345 rtc::CritScope lock(&crit_);
346
347 const auto non_anonymous_iter =
348 FindSourceInList(audio_source, &audio_source_list_);
349 if (non_anonymous_iter != audio_source_list_.end()) {
aleloi4b8bfb82016-10-12 02:14:59 -0700350 return non_anonymous_iter->is_mixed;
aleloi36542512016-10-07 05:28:32 -0700351 }
352
aleloi36542512016-10-07 05:28:32 -0700353 LOG(LS_ERROR) << "Audio source unknown";
354 return false;
355}
aleloi77ad3942016-07-04 06:33:02 -0700356} // namespace webrtc