audio_processing.cc 1.1 KB

12345678910111213141516171819202122232425262728
  1. // Copyright 2018 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "media/base/audio_processing.h"
  5. #include "base/strings/strcat.h"
  6. namespace media {
  7. std::string AudioProcessingSettings::ToString() const {
  8. auto bool_to_yes_no = [](bool b) -> const char* { return b ? "yes" : "no"; };
  9. return base::StrCat(
  10. {"aec: ", bool_to_yes_no(echo_cancellation),
  11. ", ns: ", bool_to_yes_no(noise_suppression),
  12. ", transient ns: ", bool_to_yes_no(transient_noise_suppression),
  13. ", gain control: ", bool_to_yes_no(automatic_gain_control),
  14. ", analog gain control: ",
  15. bool_to_yes_no(experimental_automatic_gain_control),
  16. ", high pass filter: ", bool_to_yes_no(high_pass_filter),
  17. ", multichannel capture processing: ",
  18. bool_to_yes_no(multi_channel_capture_processing),
  19. ", force apm creation: ", bool_to_yes_no(force_apm_creation),
  20. ", stereo mirroring: ", bool_to_yes_no(stereo_mirroring)});
  21. }
  22. } // namespace media