AnalyzeReverseStream with StreamConfig
Adding a version of AnalyzeReverseStream with audio parameters described by StreamConfig. This is part of preparations for multichannel APM in Chromium. Bug: webrtc:10913 Change-Id: I7c4650eab8bd7fcdec970a7e4a8fa203f09bed9e Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157897 Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org> Reviewed-by: Per Åhgren <peah@webrtc.org> Cr-Commit-Position: refs/heads/master@{#29573}
This commit is contained in:

committed by
Commit Bot

parent
e76b3abf61
commit
8c51f2e9cd
@ -1493,6 +1493,14 @@ int AudioProcessingImpl::AnalyzeReverseStream(const float* const* data,
|
||||
return AnalyzeReverseStreamLocked(data, reverse_config, reverse_config);
|
||||
}
|
||||
|
||||
int AudioProcessingImpl::AnalyzeReverseStream(
|
||||
const float* const* data,
|
||||
const StreamConfig& reverse_config) {
|
||||
TRACE_EVENT0("webrtc", "AudioProcessing::AnalyzeReverseStream_StreamConfig");
|
||||
rtc::CritScope cs(&crit_render_);
|
||||
return AnalyzeReverseStreamLocked(data, reverse_config, reverse_config);
|
||||
}
|
||||
|
||||
int AudioProcessingImpl::ProcessReverseStream(const float* const* src,
|
||||
const StreamConfig& input_config,
|
||||
const StreamConfig& output_config,
|
||||
|
@ -108,6 +108,8 @@ class AudioProcessingImpl : public AudioProcessing {
|
||||
size_t samples_per_channel,
|
||||
int sample_rate_hz,
|
||||
ChannelLayout layout) override;
|
||||
int AnalyzeReverseStream(const float* const* data,
|
||||
const StreamConfig& reverse_config) override;
|
||||
int ProcessReverseStream(const float* const* src,
|
||||
const StreamConfig& input_config,
|
||||
const StreamConfig& output_config,
|
||||
|
@ -593,6 +593,12 @@ class RTC_EXPORT AudioProcessing : public rtc::RefCountInterface {
|
||||
int sample_rate_hz,
|
||||
ChannelLayout layout) = 0;
|
||||
|
||||
// Accepts deinterleaved float audio with the range [-1, 1]. Each element
|
||||
// of |data| points to a channel buffer, arranged according to
|
||||
// |reverse_config|.
|
||||
virtual int AnalyzeReverseStream(const float* const* data,
|
||||
const StreamConfig& reverse_config) = 0;
|
||||
|
||||
// Accepts deinterleaved float audio with the range [-1, 1]. Each element of
|
||||
// |data| points to a channel buffer, arranged according to |reverse_config|.
|
||||
virtual int ProcessReverseStream(const float* const* src,
|
||||
|
@ -97,6 +97,9 @@ class MockAudioProcessing : public ::testing::NiceMock<AudioProcessing> {
|
||||
size_t samples_per_channel,
|
||||
int sample_rate_hz,
|
||||
ChannelLayout layout));
|
||||
MOCK_METHOD2(AnalyzeReverseStream,
|
||||
int(const float* const* data,
|
||||
const StreamConfig& reverse_config));
|
||||
MOCK_METHOD4(ProcessReverseStream,
|
||||
int(const float* const* src,
|
||||
const StreamConfig& input_config,
|
||||
|
Reference in New Issue
Block a user