APM: Replace most usages of AudioFrame with a stream interface
This CL creates a new stream interface and uses it to replace most of the usage of AudioFrame in the non-test code. The CL changes some of the test code as well, as the other changes required that. The CL will be followed by 2 more related CLs. Bug: webrtc:5298 Change-Id: I5cfbe6079f30fc3fbf35b35fd077b6fb49c7def0 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170040 Commit-Queue: Per Åhgren <peah@webrtc.org> Reviewed-by: Sam Zackrisson <saza@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30799}
This commit is contained in:
@ -15,7 +15,6 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "api/audio/audio_frame.h"
|
||||
#include "modules/audio_processing/include/audio_frame_view.h"
|
||||
#include "modules/audio_processing/include/audio_processing.h"
|
||||
#include "rtc_base/deprecation.h"
|
||||
@ -88,13 +87,19 @@ class AecDump {
|
||||
const AudioFrameView<const float>& src) = 0;
|
||||
virtual void AddCaptureStreamOutput(
|
||||
const AudioFrameView<const float>& src) = 0;
|
||||
virtual void AddCaptureStreamInput(const AudioFrame& frame) = 0;
|
||||
virtual void AddCaptureStreamOutput(const AudioFrame& frame) = 0;
|
||||
virtual void AddCaptureStreamInput(const int16_t* const data,
|
||||
int num_channels,
|
||||
int samples_per_channel) = 0;
|
||||
virtual void AddCaptureStreamOutput(const int16_t* const data,
|
||||
int num_channels,
|
||||
int samples_per_channel) = 0;
|
||||
virtual void AddAudioProcessingState(const AudioProcessingState& state) = 0;
|
||||
virtual void WriteCaptureStreamMessage() = 0;
|
||||
|
||||
// Logs Event::Type REVERSE_STREAM message.
|
||||
virtual void WriteRenderStreamMessage(const AudioFrame& frame) = 0;
|
||||
virtual void WriteRenderStreamMessage(const int16_t* const data,
|
||||
int num_channels,
|
||||
int samples_per_channel) = 0;
|
||||
virtual void WriteRenderStreamMessage(
|
||||
const AudioFrameView<const float>& src) = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user