Chromium Code Reviews| Index: webrtc/modules/audio_processing/aec3/delay_handler.h |
| diff --git a/webrtc/modules/audio_processing/aec3/delay_handler.h b/webrtc/modules/audio_processing/aec3/delay_handler.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..7581f34ddafa0545d380fee512b30445470b7727 |
| --- /dev/null |
| +++ b/webrtc/modules/audio_processing/aec3/delay_handler.h |
| @@ -0,0 +1,50 @@ |
| +/* |
| + * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. |
|
ivoc
2017/02/10 13:52:34
2017
peah-webrtc
2017/02/20 07:37:16
Done.
|
| + * |
| + * Use of this source code is governed by a BSD-style license |
| + * that can be found in the LICENSE file in the root of the source |
| + * tree. An additional intellectual property rights grant can be found |
| + * in the file PATENTS. All contributing project authors may |
| + * be found in the AUTHORS file in the root of the source tree. |
| + */ |
| + |
| +#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_DELAY_HANDLER_H_ |
|
peah-webrtc
2017/02/20 07:37:15
The functionality in DelayHandler is now moved int
|
| +#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_DELAY_HANDLER_H_ |
| + |
| +#include <algorithm> |
| +#include <array> |
| +#include <vector> |
| + |
| +#include "webrtc/base/array_view.h" |
|
ivoc
2017/02/10 13:52:34
It looks like this is not used in this header...
peah-webrtc
2017/02/20 07:37:15
Thanks!
I removed this file now.
Done.
|
| +#include "webrtc/base/constructormagic.h" |
| +#include "webrtc/base/optional.h" |
| +#include "webrtc/modules/audio_processing/aec3/aec3_constants.h" |
| + |
| +namespace webrtc { |
| + |
| +// Handles the delay estimates of the echo path. |
| +class DelayHandler { |
| + public: |
| + DelayHandler(); |
| + ~DelayHandler(); |
| + // Returns the delay estimate based on the linear filter, |
| + const rtc::Optional<size_t>& FilterDelay() const { return filter_delay_; } |
| + |
| + // Returns the externally provided delay. |
| + const rtc::Optional<size_t>& ExternalDelay() const { return external_delay_; } |
| + |
| + // Updates the delay estimates. |
| + void UpdateDelays(const std::vector<std::array<float, kFftLengthBy2Plus1>>& |
|
ivoc
2017/02/10 13:52:34
... But maybe it should be used here instead of st
peah-webrtc
2017/02/20 07:37:16
True. The advantage of doing it like this though i
|
| + filter_frequency_response, |
| + const rtc::Optional<size_t>& external_delay_samples); |
|
ivoc
2017/02/10 13:52:34
Since this is just a single number, I think the na
peah-webrtc
2017/02/20 07:37:16
samples is the unit. But I see what you mean, this
|
| + |
| + private: |
| + rtc::Optional<size_t> filter_delay_; |
| + rtc::Optional<size_t> external_delay_; |
| + |
| + RTC_DISALLOW_COPY_AND_ASSIGN(DelayHandler); |
| +}; |
| + |
| +} // namespace webrtc |
| + |
| +#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_DELAY_HANDLER_H_ |