blob: 104b6005a808313bae09169adfe2c8ef9179d9e8 [file] [log] [blame]
Alex Loiko62347222018-09-10 10:18:07 +02001/*
2 * Copyright (c) 2018 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
11#include "modules/audio_processing/test/runtime_setting_util.h"
12#include "rtc_base/checks.h"
13
14namespace webrtc {
15
16void ReplayRuntimeSetting(AudioProcessing* apm,
17 const webrtc::audioproc::RuntimeSetting& setting) {
18 RTC_CHECK(apm);
19 // TODO(bugs.webrtc.org/9138): Add ability to handle different types
20 // of settings. Currently only CapturePreGain is supported.
21 RTC_CHECK(setting.has_capture_pre_gain());
22 apm->SetRuntimeSetting(AudioProcessing::RuntimeSetting::CreateCapturePreGain(
23 setting.capture_pre_gain()));
24}
25} // namespace webrtc