Bump to WebRTC M120 release

Some API deprecation -- ExperimentalAgc and ExperimentalNs are gone.
We're continuing to carry iSAC even though it's gone upstream, but maybe
we'll want to drop that soon.
This commit is contained in:
Arun Raghavan
2023-12-12 10:42:58 -05:00
parent 9a202fb8c2
commit c6abf6cd3f
479 changed files with 20900 additions and 11996 deletions

View File

@ -21,9 +21,11 @@
namespace webrtc {
namespace {
const int kDefaultLevelDbfs = -18;
const int kNumAnalysisFrames = 100;
const double kActivityThreshold = 0.3;
constexpr int kDefaultLevelDbfs = -18;
constexpr int kNumAnalysisFrames = 100;
constexpr double kActivityThreshold = 0.3;
constexpr int kNum10msFramesInOneSecond = 100;
constexpr int kMaxSampleRateHz = 384000;
} // namespace
@ -35,8 +37,10 @@ Agc::Agc()
Agc::~Agc() = default;
void Agc::Process(const int16_t* audio, size_t length, int sample_rate_hz) {
vad_.ProcessChunk(audio, length, sample_rate_hz);
void Agc::Process(rtc::ArrayView<const int16_t> audio) {
const int sample_rate_hz = audio.size() * kNum10msFramesInOneSecond;
RTC_DCHECK_LE(sample_rate_hz, kMaxSampleRateHz);
vad_.ProcessChunk(audio.data(), audio.size(), sample_rate_hz);
const std::vector<double>& rms = vad_.chunkwise_rms();
const std::vector<double>& probabilities =
vad_.chunkwise_voice_probabilities();
@ -48,7 +52,7 @@ void Agc::Process(const int16_t* audio, size_t length, int sample_rate_hz) {
bool Agc::GetRmsErrorDb(int* error) {
if (!error) {
RTC_NOTREACHED();
RTC_DCHECK_NOTREACHED();
return false;
}