APM: Replace all remaining usage of AudioFrame outside interfaces

This CL replaces all remaining usage of AudioFrame within APM,
with the exception of the AudioProcessing interface.

The main changes are within the unittests.

Bug: webrtc:5298
Change-Id: I219cdd08f81a8679b28d9dd1359a56837945f3d4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170362
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30831}
This commit is contained in:
Per Åhgren
2020-03-19 12:33:29 +01:00
committed by Commit Bot
parent ef5c8241e2
commit 2507f8cdc9
13 changed files with 669 additions and 445 deletions

View File

@ -133,9 +133,9 @@ size_t SamplesFromRate(int rate) {
return static_cast<size_t>(AudioProcessing::kChunkSizeMs * rate / 1000);
}
void SetFrameSampleRate(AudioFrame* frame, int sample_rate_hz) {
frame->sample_rate_hz_ = sample_rate_hz;
frame->samples_per_channel_ =
void SetFrameSampleRate(Int16FrameData* frame, int sample_rate_hz) {
frame->sample_rate_hz = sample_rate_hz;
frame->samples_per_channel =
AudioProcessing::kChunkSizeMs * sample_rate_hz / 1000;
}