webrtc/data/audio_processing/output_data_float.pb
peah 2ace3f9406 The audio processing module (APM) relies on two for
functionalities  doing sample-rate conversions:
-The implicit resampling done in the AudioBuffer CopyTo,
 CopyFrom, InterleaveTo and DeinterleaveFrom methods.
-The multi-band splitting scheme.

The selection of rates in these have been difficult and
complicated, partly due to that the APM API which allows
for activating the APM submodules without notifying
the APM.

This CL adds functionality that for each capture frame
polls all submodules for whether they are active or not
and compares this against a cached result.
Furthermore, new functionality is added that based on the
results of the comparison do a reinitialization of the APM.

This has several advantages
-The code deciding on whether to analysis and synthesis is
 needed for the bandsplitting can be much simplified and
 centralized.
-The selection of the processing rate can be done such as
 to avoid the implicit resampling that was in some cases
 unnecessarily done.
-The optimization for whether an output copy is needed
 that was done to improve performance due to the implicit
 resampling is no longer needed, which simplifies the
 code and makes it less error-prone in the sense that
 is no longer neccessary to keep track of whether any
 module has changed the signal.

Finally, it should be noted that the polling of the state
for all the submodules was done previously as well, but in
a less obvious and distributed manner.

BUG=webrtc:6181, webrtc:6220, webrtc:5298, webrtc:6296, webrtc:6298, webrtc:6297

Review-Url: https://codereview.webrtc.org/2304123002
Cr-Commit-Position: refs/heads/master@{#14175}
2016-09-10 11:42:36 +00:00

15 KiB