Merge :audio_processing and :aec_dump_interface.
Merges the two targets in modules/audio_processing and removes some redundant code. This enables not writing a bunch of redundant code in https://webrtc-review.googlesource.com/c/src/+/70502 ':audio_processing' did depend on ':aec_dump_interface'. 'modules/audio_processing/aec_dump' did depend on 'aec_dump_interface' but not ':audio_processing'. Having the AecDump implementation not depending on 'audio_processing' allows to have faster compilation time and reduces the dependencies. However, maintaining such a decoupling makes APM and AecDump client code more complex. NOTRY=true # want this in and 'ios_api_framework' seems stuck. Bug: webrtc:7404 Change-Id: I75a5f234591014ac42d52bc1a36526072f5be89c Reviewed-on: https://webrtc-review.googlesource.com/76603 Commit-Queue: Alex Loiko <aleloi@webrtc.org> Reviewed-by: Alessio Bazzica <alessiob@webrtc.org> Reviewed-by: Per Åhgren <peah@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23244}
This commit is contained in:
@ -148,24 +148,6 @@ class HighPassFilterImpl : public HighPassFilter {
|
||||
AudioProcessingImpl* apm_;
|
||||
RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(HighPassFilterImpl);
|
||||
};
|
||||
|
||||
webrtc::InternalAPMStreamsConfig ToStreamsConfig(
|
||||
const ProcessingConfig& api_format) {
|
||||
webrtc::InternalAPMStreamsConfig result;
|
||||
result.input_sample_rate = api_format.input_stream().sample_rate_hz();
|
||||
result.input_num_channels = api_format.input_stream().num_channels();
|
||||
result.output_num_channels = api_format.output_stream().num_channels();
|
||||
result.render_input_num_channels =
|
||||
api_format.reverse_input_stream().num_channels();
|
||||
result.render_input_sample_rate =
|
||||
api_format.reverse_input_stream().sample_rate_hz();
|
||||
result.output_sample_rate = api_format.output_stream().sample_rate_hz();
|
||||
result.render_output_sample_rate =
|
||||
api_format.reverse_output_stream().sample_rate_hz();
|
||||
result.render_output_num_channels =
|
||||
api_format.reverse_output_stream().num_channels();
|
||||
return result;
|
||||
}
|
||||
} // namespace
|
||||
|
||||
// Throughout webrtc, it's assumed that success is represented by zero.
|
||||
@ -608,7 +590,7 @@ int AudioProcessingImpl::InitializeLocked() {
|
||||
InitializePreProcessor();
|
||||
|
||||
if (aec_dump_) {
|
||||
aec_dump_->WriteInitMessage(ToStreamsConfig(formats_.api_format));
|
||||
aec_dump_->WriteInitMessage(formats_.api_format);
|
||||
}
|
||||
return kNoError;
|
||||
}
|
||||
@ -1638,7 +1620,7 @@ void AudioProcessingImpl::AttachAecDump(std::unique_ptr<AecDump> aec_dump) {
|
||||
// 'aec_dump' parameter, which is after locks are released.
|
||||
aec_dump_.swap(aec_dump);
|
||||
WriteAecDumpConfigMessage(true);
|
||||
aec_dump_->WriteInitMessage(ToStreamsConfig(formats_.api_format));
|
||||
aec_dump_->WriteInitMessage(formats_.api_format);
|
||||
}
|
||||
|
||||
void AudioProcessingImpl::DetachAecDump() {
|
||||
|
||||
Reference in New Issue
Block a user