Update audio_processing module

Corresponds to upstream commit 524e9b043e7e86fd72353b987c9d5f6a1ebf83e1

Update notes:

 * Pull in third party license file

 * Replace .gypi files with BUILD.gn to keep track of what changes
   upstream

 * Bunch of new filse pulled in as dependencies

 * Won't build yet due to changes needed on top of these
This commit is contained in:
Arun Raghavan
2015-10-13 17:25:22 +05:30
parent 5ae7a5d6cd
commit 753eada3aa
324 changed files with 52533 additions and 16117 deletions

View File

@ -8,17 +8,16 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include "processing_component.h"
#include "webrtc/modules/audio_processing/processing_component.h"
#include <cassert>
#include <assert.h>
#include "audio_processing_impl.h"
#include "webrtc/modules/audio_processing/include/audio_processing.h"
namespace webrtc {
ProcessingComponent::ProcessingComponent(const AudioProcessingImpl* apm)
: apm_(apm),
initialized_(false),
ProcessingComponent::ProcessingComponent()
: initialized_(false),
enabled_(false),
num_handles_(0) {}
@ -33,7 +32,7 @@ int ProcessingComponent::Destroy() {
}
initialized_ = false;
return apm_->kNoError;
return AudioProcessing::kNoError;
}
int ProcessingComponent::EnableComponent(bool enable) {
@ -41,7 +40,7 @@ int ProcessingComponent::EnableComponent(bool enable) {
enabled_ = enable; // Must be set before Initialize() is called.
int err = Initialize();
if (err != apm_->kNoError) {
if (err != AudioProcessing::kNoError) {
enabled_ = false;
return err;
}
@ -49,7 +48,7 @@ int ProcessingComponent::EnableComponent(bool enable) {
enabled_ = enable;
}
return apm_->kNoError;
return AudioProcessing::kNoError;
}
bool ProcessingComponent::is_component_enabled() const {
@ -67,7 +66,7 @@ int ProcessingComponent::num_handles() const {
int ProcessingComponent::Initialize() {
if (!enabled_) {
return apm_->kNoError;
return AudioProcessing::kNoError;
}
num_handles_ = num_handles_required();
@ -80,12 +79,12 @@ int ProcessingComponent::Initialize() {
if (handles_[i] == NULL) {
handles_[i] = CreateHandle();
if (handles_[i] == NULL) {
return apm_->kCreationFailedError;
return AudioProcessing::kCreationFailedError;
}
}
int err = InitializeHandle(handles_[i]);
if (err != apm_->kNoError) {
if (err != AudioProcessing::kNoError) {
return GetHandleError(handles_[i]);
}
}
@ -96,17 +95,17 @@ int ProcessingComponent::Initialize() {
int ProcessingComponent::Configure() {
if (!initialized_) {
return apm_->kNoError;
return AudioProcessing::kNoError;
}
assert(static_cast<int>(handles_.size()) >= num_handles_);
for (int i = 0; i < num_handles_; i++) {
int err = ConfigureHandle(handles_[i]);
if (err != apm_->kNoError) {
if (err != AudioProcessing::kNoError) {
return GetHandleError(handles_[i]);
}
}
return apm_->kNoError;
return AudioProcessing::kNoError;
}
} // namespace webrtc