Run fullband processing at output rate on ARM

The audio processing in the band-split domain on ARM platforms
operate at a sampling frequency of 32 kHz. This CL upsamples
the signal to fullband before the "fullband processing"
if an output rate of 48 kHz is chosen.

Change-Id: I268acd33aff1fcfa4f75ba8c0fb3e16abb9f74e8
Bug: b/130016532
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/155640
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29415}
This commit is contained in:
Gustaf Ullberg
2019-10-09 13:02:14 +02:00
committed by Commit Bot
parent 1d3008bfc6
commit 422b9e0982
5 changed files with 119 additions and 13 deletions

View File

@ -245,6 +245,10 @@ class AudioProcessingImpl : public AudioProcessing {
void InitializeAnalyzer() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
void InitializePreProcessor() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_render_);
// Sample rate used for the fullband processing.
int proc_fullband_sample_rate_hz() const
RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
// Empties and handles the respective RuntimeSetting queues.
void HandleCaptureRuntimeSettings()
RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_capture_);
@ -387,6 +391,7 @@ class AudioProcessingImpl : public AudioProcessing {
bool key_pressed;
bool transient_suppressor_enabled;
std::unique_ptr<AudioBuffer> capture_audio;
std::unique_ptr<AudioBuffer> capture_fullband_audio;
// Only the rate and samples fields of capture_processing_format_ are used
// because the capture processing number of channels is mutable and is
// tracked by the capture_audio_.