mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-13 13:50:40 +01:00
Remove AudioProcessing::ChannelLayout
This enum is no longer needed. Also moving the last piece of code from common.h to audio_processing_impl.h, allowing to delete common.h. Bug: chromium:1271981, b/217349489 Change-Id: If115336c36d6d7b5845a903e421c18aebfe434ee Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251242 Reviewed-by: Sam Zackrisson <saza@webrtc.org> Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org> Cr-Commit-Position: refs/heads/main@{#35946}
This commit is contained in:
parent
fd6c744a7c
commit
8a9aa55561
9 changed files with 4 additions and 66 deletions
|
@ -146,7 +146,6 @@ rtc_library("audio_processing") {
|
|||
"audio_processing_builder_impl.cc",
|
||||
"audio_processing_impl.cc",
|
||||
"audio_processing_impl.h",
|
||||
"common.h",
|
||||
"echo_control_mobile_impl.cc",
|
||||
"echo_control_mobile_impl.h",
|
||||
"gain_control_impl.cc",
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
#include "common_audio/include/audio_util.h"
|
||||
#include "modules/audio_processing/aec_dump/aec_dump_factory.h"
|
||||
#include "modules/audio_processing/audio_buffer.h"
|
||||
#include "modules/audio_processing/common.h"
|
||||
#include "modules/audio_processing/include/audio_frame_view.h"
|
||||
#include "modules/audio_processing/logging/apm_data_dumper.h"
|
||||
#include "modules/audio_processing/optionally_built_submodule_creators.h"
|
||||
|
|
|
@ -51,6 +51,10 @@ namespace webrtc {
|
|||
class ApmDataDumper;
|
||||
class AudioConverter;
|
||||
|
||||
constexpr int RuntimeSettingQueueSize() {
|
||||
return 100;
|
||||
}
|
||||
|
||||
class AudioProcessingImpl : public AudioProcessing {
|
||||
public:
|
||||
// Methods forcing APM to run in a single-threaded manner.
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#include <memory>
|
||||
|
||||
#include "api/scoped_refptr.h"
|
||||
#include "modules/audio_processing/common.h"
|
||||
#include "modules/audio_processing/include/audio_processing.h"
|
||||
#include "modules/audio_processing/optionally_built_submodule_creators.h"
|
||||
#include "modules/audio_processing/test/audio_processing_builder_for_testing.h"
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#include "common_audio/signal_processing/include/signal_processing_library.h"
|
||||
#include "modules/audio_processing/aec_dump/aec_dump_factory.h"
|
||||
#include "modules/audio_processing/audio_processing_impl.h"
|
||||
#include "modules/audio_processing/common.h"
|
||||
#include "modules/audio_processing/include/mock_audio_processing.h"
|
||||
#include "modules/audio_processing/test/audio_processing_builder_for_testing.h"
|
||||
#include "modules/audio_processing/test/protobuf_utils.h"
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef MODULES_AUDIO_PROCESSING_COMMON_H_
|
||||
#define MODULES_AUDIO_PROCESSING_COMMON_H_
|
||||
|
||||
#include "modules/audio_processing/include/audio_processing.h"
|
||||
#include "rtc_base/checks.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
constexpr int RuntimeSettingQueueSize() {
|
||||
return 100;
|
||||
}
|
||||
|
||||
static inline size_t ChannelsFromLayout(AudioProcessing::ChannelLayout layout) {
|
||||
switch (layout) {
|
||||
case AudioProcessing::kMono:
|
||||
case AudioProcessing::kMonoAndKeyboard:
|
||||
return 1;
|
||||
case AudioProcessing::kStereo:
|
||||
case AudioProcessing::kStereoAndKeyboard:
|
||||
return 2;
|
||||
}
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
#endif // MODULES_AUDIO_PROCESSING_COMMON_H_
|
|
@ -385,17 +385,6 @@ class RTC_EXPORT AudioProcessing : public rtc::RefCountInterface {
|
|||
std::string ToString() const;
|
||||
};
|
||||
|
||||
// TODO(mgraczyk): Remove once all methods that use ChannelLayout are gone.
|
||||
enum ChannelLayout {
|
||||
kMono,
|
||||
// Left, right.
|
||||
kStereo,
|
||||
// Mono, keyboard, and mic.
|
||||
kMonoAndKeyboard,
|
||||
// Left, right, keyboard, and mic.
|
||||
kStereoAndKeyboard
|
||||
};
|
||||
|
||||
// Specifies the properties of a setting to be passed to AudioProcessing at
|
||||
// runtime.
|
||||
class RuntimeSetting {
|
||||
|
|
|
@ -139,15 +139,4 @@ void SetFrameSampleRate(Int16FrameData* frame, int sample_rate_hz) {
|
|||
AudioProcessing::kChunkSizeMs * sample_rate_hz / 1000;
|
||||
}
|
||||
|
||||
AudioProcessing::ChannelLayout LayoutFromChannels(size_t num_channels) {
|
||||
switch (num_channels) {
|
||||
case 1:
|
||||
return AudioProcessing::kMono;
|
||||
case 2:
|
||||
return AudioProcessing::kStereo;
|
||||
default:
|
||||
RTC_CHECK_NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
|
|
@ -154,8 +154,6 @@ void SetContainerFormat(int sample_rate_hz,
|
|||
cb->reset(new ChannelBuffer<T>(frame->samples_per_channel, num_channels));
|
||||
}
|
||||
|
||||
AudioProcessing::ChannelLayout LayoutFromChannels(size_t num_channels);
|
||||
|
||||
template <typename T>
|
||||
float ComputeSNR(const T* ref, const T* test, size_t length, float* variance) {
|
||||
float mse = 0;
|
||||
|
|
Loading…
Reference in a new issue