Add a Config class interface to AudioProcessing for passing options.
Pass the Config down to all AudioProcessing components. Also add an EchoCancellationImplWrapper to optionally create different EchoCancellationImpls. BUG=2117 TBR=turaj@webrtc.org TESTED=git try Review URL: https://webrtc-codereview.appspot.com/1843004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4400 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -13,7 +13,7 @@
|
||||
#include <assert.h>
|
||||
|
||||
#include "webrtc/modules/audio_processing/audio_buffer.h"
|
||||
#include "webrtc/modules/audio_processing/echo_cancellation_impl.h"
|
||||
#include "webrtc/modules/audio_processing/echo_cancellation_impl_wrapper.h"
|
||||
#include "webrtc/modules/audio_processing/echo_control_mobile_impl.h"
|
||||
#include "webrtc/modules/audio_processing/gain_control_impl.h"
|
||||
#include "webrtc/modules/audio_processing/high_pass_filter_impl.h"
|
||||
@ -76,7 +76,7 @@ AudioProcessingImpl::AudioProcessingImpl(int id)
|
||||
num_reverse_channels_(1),
|
||||
num_input_channels_(1),
|
||||
num_output_channels_(1) {
|
||||
echo_cancellation_ = new EchoCancellationImpl(this);
|
||||
echo_cancellation_ = EchoCancellationImplWrapper::Create(this);
|
||||
component_list_.push_back(echo_cancellation_);
|
||||
|
||||
echo_control_mobile_ = new EchoControlMobileImpl(this);
|
||||
@ -181,6 +181,12 @@ int AudioProcessingImpl::InitializeLocked() {
|
||||
return kNoError;
|
||||
}
|
||||
|
||||
void AudioProcessingImpl::SetExtraOptions(const Config& config) {
|
||||
std::list<ProcessingComponent*>::iterator it;
|
||||
for (it = component_list_.begin(); it != component_list_.end(); ++it)
|
||||
(*it)->SetExtraOptions(config);
|
||||
}
|
||||
|
||||
int AudioProcessingImpl::set_sample_rate_hz(int rate) {
|
||||
CriticalSectionScoped crit_scoped(crit_);
|
||||
if (rate == sample_rate_hz_) {
|
||||
|
||||
Reference in New Issue
Block a user