blob: 2c88c4e46c13b74118143d55d20e25ed0f28cefb [file] [log] [blame]
andrew@webrtc.orgddbb8a22014-04-22 21:00:04 +00001/*
2 * Copyright (c) 2014 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
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020011#ifndef MODULES_AUDIO_PROCESSING_COMMON_H_
12#define MODULES_AUDIO_PROCESSING_COMMON_H_
andrew@webrtc.orgddbb8a22014-04-22 21:00:04 +000013
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020014#include "modules/audio_processing/include/audio_processing.h"
15#include "rtc_base/checks.h"
andrew@webrtc.orgddbb8a22014-04-22 21:00:04 +000016
17namespace webrtc {
18
Per Ã…hgren652ada52021-03-03 10:52:44 +000019constexpr int RuntimeSettingQueueSize() {
20 return 100;
21}
22
Peter Kasting69558702016-01-12 16:26:35 -080023static inline size_t ChannelsFromLayout(AudioProcessing::ChannelLayout layout) {
andrew@webrtc.orgddbb8a22014-04-22 21:00:04 +000024 switch (layout) {
25 case AudioProcessing::kMono:
26 case AudioProcessing::kMonoAndKeyboard:
27 return 1;
28 case AudioProcessing::kStereo:
29 case AudioProcessing::kStereoAndKeyboard:
30 return 2;
31 }
kwiberg9e2be5f2016-09-14 05:23:22 -070032 RTC_NOTREACHED();
pkasting25702cb2016-01-08 13:50:27 -080033 return 0;
andrew@webrtc.orgddbb8a22014-04-22 21:00:04 +000034}
35
andrew@webrtc.orgddbb8a22014-04-22 21:00:04 +000036} // namespace webrtc
37
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020038#endif // MODULES_AUDIO_PROCESSING_COMMON_H_