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:
@ -74,26 +74,27 @@ AecDumpImpl::~AecDumpImpl() {
|
||||
thread_sync_event.Wait(rtc::Event::kForever);
|
||||
}
|
||||
|
||||
void AecDumpImpl::WriteInitMessage(
|
||||
const InternalAPMStreamsConfig& streams_config) {
|
||||
void AecDumpImpl::WriteInitMessage(const ProcessingConfig& api_format) {
|
||||
auto task = CreateWriteToFileTask();
|
||||
auto* event = task->GetEvent();
|
||||
event->set_type(audioproc::Event::INIT);
|
||||
audioproc::Init* msg = event->mutable_init();
|
||||
|
||||
msg->set_sample_rate(streams_config.input_sample_rate);
|
||||
msg->set_output_sample_rate(streams_config.output_sample_rate);
|
||||
msg->set_reverse_sample_rate(streams_config.render_input_sample_rate);
|
||||
msg->set_reverse_output_sample_rate(streams_config.render_output_sample_rate);
|
||||
msg->set_sample_rate(api_format.input_stream().sample_rate_hz());
|
||||
msg->set_output_sample_rate(api_format.output_stream().sample_rate_hz());
|
||||
msg->set_reverse_sample_rate(
|
||||
api_format.reverse_input_stream().sample_rate_hz());
|
||||
msg->set_reverse_output_sample_rate(
|
||||
api_format.reverse_output_stream().sample_rate_hz());
|
||||
|
||||
msg->set_num_input_channels(
|
||||
static_cast<int32_t>(streams_config.input_num_channels));
|
||||
static_cast<int32_t>(api_format.input_stream().num_channels()));
|
||||
msg->set_num_output_channels(
|
||||
static_cast<int32_t>(streams_config.output_num_channels));
|
||||
static_cast<int32_t>(api_format.output_stream().num_channels()));
|
||||
msg->set_num_reverse_channels(
|
||||
static_cast<int32_t>(streams_config.render_input_num_channels));
|
||||
static_cast<int32_t>(api_format.reverse_input_stream().num_channels()));
|
||||
msg->set_num_reverse_output_channels(
|
||||
streams_config.render_output_num_channels);
|
||||
api_format.reverse_output_stream().num_channels());
|
||||
|
||||
worker_queue_->PostTask(std::unique_ptr<rtc::QueuedTask>(std::move(task)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user