summaryrefslogtreecommitdiffstats
path: root/chromium/media/base/audio_processing.cc
blob: 710c5aea61ccbc4e381e967a0516b84d77a6b99d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "media/base/audio_processing.h"

#include "base/strings/strcat.h"

namespace media {

std::string AudioProcessingSettings::ToString() const {
  auto bool_to_yes_no = [](bool b) -> const char* { return b ? "yes" : "no"; };

  return base::StrCat(
      {"aec: ", bool_to_yes_no(echo_cancellation),
       ", ns: ", bool_to_yes_no(noise_suppression),
       ", transient ns: ", bool_to_yes_no(transient_noise_suppression),
       ", gain control: ", bool_to_yes_no(automatic_gain_control),
       ", analog gain control: ",
       bool_to_yes_no(experimental_automatic_gain_control),
       ", high pass filter: ", bool_to_yes_no(high_pass_filter),
       ", multichannel capture processing: ",
       bool_to_yes_no(multi_channel_capture_processing),
       ", force apm creation: ", bool_to_yes_no(force_apm_creation),
       ", stereo mirroring: ", bool_to_yes_no(stereo_mirroring)});
}

}  // namespace media