blob: 57fae8cc0d34e28d57fd71859d6340bf3140a486 [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);
aleloi8b2233f2016-07-28 06:24:14 -0700146 thread_checker_.DetachFromThread();
aleloia0db81f2016-07-28 06:36:22 -0700147}
aleloi77ad3942016-07-04 06:33:02 -0700148
aleloi5d167d62016-08-24 02:20:54 -0700149AudioMixerImpl::~AudioMixerImpl() {}
aleloi70f866c2016-08-16 02:15:49 -0700150
aleloi116ec6d2016-10-12 06:07:07 -0700151rtc::scoped_refptr<AudioMixerImpl> AudioMixerImpl::Create() {
aleloi77ad3942016-07-04 06:33:02 -0700152 Config config;
153 config.Set<ExperimentalAgc>(new ExperimentalAgc(false));
aleloi311525e2016-09-07 06:13:12 -0700154 std::unique_ptr<AudioProcessing> limiter(AudioProcessing::Create(config));
aleloie97974d2016-10-12 03:06:09 -0700155 if (!limiter.get()) {
aleloi311525e2016-09-07 06:13:12 -0700156 return nullptr;
aleloie97974d2016-10-12 03:06:09 -0700157 }
aleloi77ad3942016-07-04 06:33:02 -0700158
aleloi311525e2016-09-07 06:13:12 -0700159 if (limiter->gain_control()->set_mode(GainControl::kFixedDigital) !=
aleloie97974d2016-10-12 03:06:09 -0700160 limiter->kNoError) {
aleloi311525e2016-09-07 06:13:12 -0700161 return nullptr;
aleloie97974d2016-10-12 03:06:09 -0700162 }
aleloi77ad3942016-07-04 06:33:02 -0700163
164 // We smoothly limit the mixed frame to -7 dbFS. -6 would correspond to the
165 // divide-by-2 but -7 is used instead to give a bit of headroom since the
166 // AGC is not a hard limiter.
aleloie97974d2016-10-12 03:06:09 -0700167 if (limiter->gain_control()->set_target_level_dbfs(7) != limiter->kNoError) {
aleloi311525e2016-09-07 06:13:12 -0700168 return nullptr;
aleloie97974d2016-10-12 03:06:09 -0700169 }
aleloi77ad3942016-07-04 06:33:02 -0700170
aleloie97974d2016-10-12 03:06:09 -0700171 if (limiter->gain_control()->set_compression_gain_db(0) !=
172 limiter->kNoError) {
aleloi311525e2016-09-07 06:13:12 -0700173 return nullptr;
aleloie97974d2016-10-12 03:06:09 -0700174 }
aleloi77ad3942016-07-04 06:33:02 -0700175
aleloie97974d2016-10-12 03:06:09 -0700176 if (limiter->gain_control()->enable_limiter(true) != limiter->kNoError) {
aleloi311525e2016-09-07 06:13:12 -0700177 return nullptr;
aleloie97974d2016-10-12 03:06:09 -0700178 }
aleloi77ad3942016-07-04 06:33:02 -0700179
aleloie97974d2016-10-12 03:06:09 -0700180 if (limiter->gain_control()->Enable(true) != limiter->kNoError) {
aleloi311525e2016-09-07 06:13:12 -0700181 return nullptr;
aleloie97974d2016-10-12 03:06:09 -0700182 }
aleloi77ad3942016-07-04 06:33:02 -0700183
aleloi116ec6d2016-10-12 06:07:07 -0700184 return rtc::scoped_refptr<AudioMixerImpl>(
185 new rtc::RefCountedObject<AudioMixerImpl>(std::move(limiter)));
aleloi77ad3942016-07-04 06:33:02 -0700186}
187
aleloi5d167d62016-08-24 02:20:54 -0700188void AudioMixerImpl::Mix(int sample_rate,
189 size_t number_of_channels,
190 AudioFrame* audio_frame_for_mixing) {
aleloi44968092016-08-08 10:18:58 -0700191 RTC_DCHECK(number_of_channels == 1 || number_of_channels == 2);
aleloi311525e2016-09-07 06:13:12 -0700192 RTC_DCHECK_RUN_ON(&thread_checker_);
aleloi311525e2016-09-07 06:13:12 -0700193
aleloi311525e2016-09-07 06:13:12 -0700194 if (OutputFrequency() != sample_rate) {
aleloie97974d2016-10-12 03:06:09 -0700195 SetOutputFrequency(sample_rate);
aleloi311525e2016-09-07 06:13:12 -0700196 }
197
aleloi652ac892016-09-07 07:42:14 -0700198 AudioFrameList mix_list;
aleloi77ad3942016-07-04 06:33:02 -0700199 {
aleloi311525e2016-09-07 06:13:12 -0700200 rtc::CritScope lock(&crit_);
aleloi116ec6d2016-10-12 06:07:07 -0700201 mix_list = GetAudioFromSources();
aleloi77ad3942016-07-04 06:33:02 -0700202 }
203
aleloi652ac892016-09-07 07:42:14 -0700204 for (const auto& frame : mix_list) {
aleloie8914152016-10-11 06:18:31 -0700205 RemixFrame(number_of_channels, frame);
aleloi44968092016-08-08 10:18:58 -0700206 }
aleloi09f45102016-07-28 03:52:15 -0700207
208 audio_frame_for_mixing->UpdateFrame(
aleloia4c21062016-09-08 01:25:46 -0700209 -1, time_stamp_, NULL, 0, OutputFrequency(), AudioFrame::kNormalSpeech,
aleloi44968092016-08-08 10:18:58 -0700210 AudioFrame::kVadPassive, number_of_channels);
aleloi09f45102016-07-28 03:52:15 -0700211
aleloi6382a192016-08-08 10:25:04 -0700212 time_stamp_ += static_cast<uint32_t>(sample_size_);
aleloi09f45102016-07-28 03:52:15 -0700213
aleloi116ec6d2016-10-12 06:07:07 -0700214 use_limiter_ = mix_list.size() > 1;
aleloi09f45102016-07-28 03:52:15 -0700215
aleloi652ac892016-09-07 07:42:14 -0700216 // We only use the limiter if we're actually mixing multiple streams.
aleloie97974d2016-10-12 03:06:09 -0700217 MixFromList(audio_frame_for_mixing, mix_list, use_limiter_);
aleloi652ac892016-09-07 07:42:14 -0700218
aleloi311525e2016-09-07 06:13:12 -0700219 if (audio_frame_for_mixing->samples_per_channel_ == 0) {
220 // Nothing was mixed, set the audio samples to silence.
221 audio_frame_for_mixing->samples_per_channel_ = sample_size_;
222 audio_frame_for_mixing->Mute();
223 } else {
224 // Only call the limiter if we have something to mix.
225 LimitMixedAudio(audio_frame_for_mixing);
aleloi77ad3942016-07-04 06:33:02 -0700226 }
aleloi616df1e2016-08-24 01:17:12 -0700227
aleloi77ad3942016-07-04 06:33:02 -0700228 return;
229}
230
aleloie97974d2016-10-12 03:06:09 -0700231void AudioMixerImpl::SetOutputFrequency(int frequency) {
aleloi311525e2016-09-07 06:13:12 -0700232 RTC_DCHECK_RUN_ON(&thread_checker_);
aleloi6382a192016-08-08 10:25:04 -0700233 output_frequency_ = frequency;
aleloidc7669a2016-10-04 04:06:20 -0700234 sample_size_ = (output_frequency_ * kFrameDurationInMs) / 1000;
aleloi77ad3942016-07-04 06:33:02 -0700235}
236
aleloie97974d2016-10-12 03:06:09 -0700237int AudioMixerImpl::OutputFrequency() const {
aleloi311525e2016-09-07 06:13:12 -0700238 RTC_DCHECK_RUN_ON(&thread_checker_);
aleloi6382a192016-08-08 10:25:04 -0700239 return output_frequency_;
aleloi77ad3942016-07-04 06:33:02 -0700240}
241
aleloi116ec6d2016-10-12 06:07:07 -0700242bool AudioMixerImpl::AddSource(Source* audio_source) {
243 RTC_DCHECK(audio_source);
244 rtc::CritScope lock(&crit_);
245 RTC_DCHECK(FindSourceInList(audio_source, &audio_source_list_) ==
246 audio_source_list_.end())
247 << "Source already added to mixer";
248 audio_source_list_.emplace_back(audio_source, false, 0);
249 return true;
aleloi77ad3942016-07-04 06:33:02 -0700250}
251
aleloi116ec6d2016-10-12 06:07:07 -0700252bool AudioMixerImpl::RemoveSource(Source* audio_source) {
253 RTC_DCHECK(audio_source);
254 rtc::CritScope lock(&crit_);
255 const auto iter = FindSourceInList(audio_source, &audio_source_list_);
256 RTC_DCHECK(iter != audio_source_list_.end()) << "Source not present in mixer";
257 audio_source_list_.erase(iter);
258 return true;
259}
aleloi77ad3942016-07-04 06:33:02 -0700260
aleloi116ec6d2016-10-12 06:07:07 -0700261AudioFrameList AudioMixerImpl::GetAudioFromSources() {
aleloi311525e2016-09-07 06:13:12 -0700262 RTC_DCHECK_RUN_ON(&thread_checker_);
aleloif3882572016-07-29 02:12:41 -0700263 AudioFrameList result;
aleloia4c21062016-09-08 01:25:46 -0700264 std::vector<SourceFrame> audio_source_mixing_data_list;
aleloi652ac892016-09-07 07:42:14 -0700265 std::vector<SourceFrame> ramp_list;
aleloi77ad3942016-07-04 06:33:02 -0700266
aleloif3882572016-07-29 02:12:41 -0700267 // Get audio source audio and put it in the struct vector.
aleloi36542512016-10-07 05:28:32 -0700268 for (auto& source_and_status : audio_source_list_) {
269 auto audio_frame_with_info =
aleloi4b8bfb82016-10-12 02:14:59 -0700270 source_and_status.audio_source->GetAudioFrameWithInfo(
aleloie97974d2016-10-12 03:06:09 -0700271 static_cast<int>(OutputFrequency()));
aleloi77ad3942016-07-04 06:33:02 -0700272
aleloia4c21062016-09-08 01:25:46 -0700273 const auto audio_frame_info = audio_frame_with_info.audio_frame_info;
aleloif3882572016-07-29 02:12:41 -0700274 AudioFrame* audio_source_audio_frame = audio_frame_with_info.audio_frame;
275
aleloie8914152016-10-11 06:18:31 -0700276 if (audio_frame_info == Source::AudioFrameInfo::kError) {
aleloie97974d2016-10-12 03:06:09 -0700277 LOG_F(LS_WARNING) << "failed to GetAudioFrameWithInfo() from source";
tereliusea4c1412016-07-29 01:36:14 -0700278 continue;
279 }
aleloia4c21062016-09-08 01:25:46 -0700280 audio_source_mixing_data_list.emplace_back(
aleloi36542512016-10-07 05:28:32 -0700281 &source_and_status, audio_source_audio_frame,
aleloie8914152016-10-11 06:18:31 -0700282 audio_frame_info == Source::AudioFrameInfo::kMuted);
aleloif3882572016-07-29 02:12:41 -0700283 }
284
285 // Sort frames by sorting function.
aleloia4c21062016-09-08 01:25:46 -0700286 std::sort(audio_source_mixing_data_list.begin(),
aleloi4b8bfb82016-10-12 02:14:59 -0700287 audio_source_mixing_data_list.end(), ShouldMixBefore);
aleloif3882572016-07-29 02:12:41 -0700288
aleloia4c21062016-09-08 01:25:46 -0700289 int max_audio_frame_counter = kMaximumAmountOfMixedAudioSources;
290
291 // Go through list in order and put unmuted frames in result list.
aleloi36542512016-10-07 05:28:32 -0700292 for (const auto& p : audio_source_mixing_data_list) {
aleloif3882572016-07-29 02:12:41 -0700293 // Filter muted.
aleloi4b8bfb82016-10-12 02:14:59 -0700294 if (p.muted) {
295 p.source_status->is_mixed = false;
aleloif3882572016-07-29 02:12:41 -0700296 continue;
tereliusea4c1412016-07-29 01:36:14 -0700297 }
aleloi2942e242016-07-29 01:23:49 -0700298
aleloif3882572016-07-29 02:12:41 -0700299 // Add frame to result vector for mixing.
300 bool is_mixed = false;
aleloia4c21062016-09-08 01:25:46 -0700301 if (max_audio_frame_counter > 0) {
302 --max_audio_frame_counter;
aleloi4b8bfb82016-10-12 02:14:59 -0700303 result.push_back(p.audio_frame);
304 ramp_list.emplace_back(p.source_status, p.audio_frame, false, -1);
aleloif3882572016-07-29 02:12:41 -0700305 is_mixed = true;
tereliusea4c1412016-07-29 01:36:14 -0700306 }
aleloi4b8bfb82016-10-12 02:14:59 -0700307 p.source_status->is_mixed = is_mixed;
tereliusea4c1412016-07-29 01:36:14 -0700308 }
aleloi4b8bfb82016-10-12 02:14:59 -0700309 RampAndUpdateGain(ramp_list);
aleloif3882572016-07-29 02:12:41 -0700310 return result;
aleloi77ad3942016-07-04 06:33:02 -0700311}
312
aleloi77ad3942016-07-04 06:33:02 -0700313
aleloia4c21062016-09-08 01:25:46 -0700314bool AudioMixerImpl::LimitMixedAudio(AudioFrame* mixed_audio) const {
aleloi311525e2016-09-07 06:13:12 -0700315 RTC_DCHECK_RUN_ON(&thread_checker_);
aleloi77ad3942016-07-04 06:33:02 -0700316 if (!use_limiter_) {
317 return true;
318 }
319
320 // Smoothly limit the mixed frame.
aleloia4c21062016-09-08 01:25:46 -0700321 const int error = limiter_->ProcessStream(mixed_audio);
aleloi77ad3942016-07-04 06:33:02 -0700322
323 // And now we can safely restore the level. This procedure results in
324 // some loss of resolution, deemed acceptable.
325 //
326 // It's possible to apply the gain in the AGC (with a target level of 0 dbFS
327 // and compression gain of 6 dB). However, in the transition frame when this
aleloi09f45102016-07-28 03:52:15 -0700328 // is enabled (moving from one to two audio sources) it has the potential to
aleloi77ad3942016-07-04 06:33:02 -0700329 // create discontinuities in the mixed frame.
330 //
331 // Instead we double the frame (with addition since left-shifting a
332 // negative value is undefined).
aleloia4c21062016-09-08 01:25:46 -0700333 *mixed_audio += *mixed_audio;
aleloi77ad3942016-07-04 06:33:02 -0700334
aleloi6382a192016-08-08 10:25:04 -0700335 if (error != limiter_->kNoError) {
aleloie97974d2016-10-12 03:06:09 -0700336 LOG_F(LS_ERROR) << "Error from AudioProcessing: " << error;
aleloi09f45102016-07-28 03:52:15 -0700337 RTC_NOTREACHED();
aleloi77ad3942016-07-04 06:33:02 -0700338 return false;
339 }
340 return true;
341}
aleloi616df1e2016-08-24 01:17:12 -0700342
aleloi36542512016-10-07 05:28:32 -0700343bool AudioMixerImpl::GetAudioSourceMixabilityStatusForTest(
aleloie97974d2016-10-12 03:06:09 -0700344 AudioMixerImpl::Source* audio_source) const {
aleloi36542512016-10-07 05:28:32 -0700345 RTC_DCHECK_RUN_ON(&thread_checker_);
346 rtc::CritScope lock(&crit_);
347
348 const auto non_anonymous_iter =
349 FindSourceInList(audio_source, &audio_source_list_);
350 if (non_anonymous_iter != audio_source_list_.end()) {
aleloi4b8bfb82016-10-12 02:14:59 -0700351 return non_anonymous_iter->is_mixed;
aleloi36542512016-10-07 05:28:32 -0700352 }
353
aleloi36542512016-10-07 05:28:32 -0700354 LOG(LS_ERROR) << "Audio source unknown";
355 return false;
356}
aleloi77ad3942016-07-04 06:33:02 -0700357} // namespace webrtc