Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Unified Diff: webrtc/modules/audio_processing/high_pass_filter_impl.h

Issue 1490333004: HighPassFilter not a ProcessingComponent anymore (bit exact). (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: comments+rebase Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_processing/high_pass_filter_impl.h
diff --git a/webrtc/modules/audio_processing/high_pass_filter_impl.h b/webrtc/modules/audio_processing/high_pass_filter_impl.h
index 6f8079e32cba2a52a016e581b2242583dcc6c39f..b2a0717374f293740dffea808fe2e1f2f8764b43 100644
--- a/webrtc/modules/audio_processing/high_pass_filter_impl.h
+++ b/webrtc/modules/audio_processing/high_pass_filter_impl.h
@@ -12,39 +12,31 @@
#define WEBRTC_MODULES_AUDIO_PROCESSING_HIGH_PASS_FILTER_IMPL_H_
#include "webrtc/base/criticalsection.h"
+#include "webrtc/base/scoped_ptr.h"
#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/modules/audio_processing/processing_component.h"
namespace webrtc {
class AudioBuffer;
-class HighPassFilterImpl : public HighPassFilter,
- public ProcessingComponent {
+class HighPassFilterImpl : public HighPassFilter {
public:
- HighPassFilterImpl(const AudioProcessing* apm, rtc::CriticalSection* crit);
- virtual ~HighPassFilterImpl();
+ explicit HighPassFilterImpl(rtc::CriticalSection* crit);
+ ~HighPassFilterImpl() override;
- int ProcessCaptureAudio(AudioBuffer* audio);
+ // TODO(peah): Fold into ctor, once public API is removed.
+ void Initialize(int channels, int sample_rate_hz);
+ void ProcessCaptureAudio(AudioBuffer* audio);
// HighPassFilter implementation.
+ int Enable(bool enable) override;
bool is_enabled() const override;
private:
- // HighPassFilter implementation.
- int Enable(bool enable) override;
-
- // ProcessingComponent implementation.
- void* CreateHandle() const override;
- int InitializeHandle(void* handle) const override;
- int ConfigureHandle(void* handle) const override;
- void DestroyHandle(void* handle) const override;
- int num_handles_required() const override;
- int GetHandleError(void* handle) const override;
-
- const AudioProcessing* apm_;
-
- rtc::CriticalSection* const crit_;
+ class BiquadFilter;
+ rtc::CriticalSection* const crit_ = nullptr;
+ bool enabled_ GUARDED_BY(crit_) = false;
+ std::vector<rtc::scoped_ptr<BiquadFilter>> filters_ GUARDED_BY(crit_);
};
} // namespace webrtc
« no previous file with comments | « webrtc/modules/audio_processing/audio_processing_impl.cc ('k') | webrtc/modules/audio_processing/high_pass_filter_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698