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

Side by Side Diff: webrtc/modules/audio_processing/aec3/render_delay_controller.h

Issue 3007763002: Move array_view.h to webrtc/api/ (Closed)
Patch Set: rebase Created 3 years, 3 months 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_RENDER_DELAY_CONTROLLER_H_ 11 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_RENDER_DELAY_CONTROLLER_H_
12 #define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_RENDER_DELAY_CONTROLLER_H_ 12 #define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_RENDER_DELAY_CONTROLLER_H_
13 13
14 #include "webrtc/api/array_view.h"
14 #include "webrtc/modules/audio_processing/aec3/downsampled_render_buffer.h" 15 #include "webrtc/modules/audio_processing/aec3/downsampled_render_buffer.h"
15 #include "webrtc/modules/audio_processing/aec3/render_delay_buffer.h" 16 #include "webrtc/modules/audio_processing/aec3/render_delay_buffer.h"
16 #include "webrtc/modules/audio_processing/include/audio_processing.h" 17 #include "webrtc/modules/audio_processing/include/audio_processing.h"
17 #include "webrtc/modules/audio_processing/logging/apm_data_dumper.h" 18 #include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
18 #include "webrtc/rtc_base/array_view.h"
19 #include "webrtc/rtc_base/optional.h" 19 #include "webrtc/rtc_base/optional.h"
20 20
21 namespace webrtc { 21 namespace webrtc {
22 22
23 // Class for aligning the render and capture signal using a RenderDelayBuffer. 23 // Class for aligning the render and capture signal using a RenderDelayBuffer.
24 class RenderDelayController { 24 class RenderDelayController {
25 public: 25 public:
26 static RenderDelayController* Create( 26 static RenderDelayController* Create(
27 const AudioProcessing::Config::EchoCanceller3& config, 27 const AudioProcessing::Config::EchoCanceller3& config,
28 int sample_rate_hz); 28 int sample_rate_hz);
29 virtual ~RenderDelayController() = default; 29 virtual ~RenderDelayController() = default;
30 30
31 // Resets the delay controller. 31 // Resets the delay controller.
32 virtual void Reset() = 0; 32 virtual void Reset() = 0;
33 33
34 // Receives the externally used delay. 34 // Receives the externally used delay.
35 virtual void SetDelay(size_t render_delay) = 0; 35 virtual void SetDelay(size_t render_delay) = 0;
36 36
37 // Aligns the render buffer content with the capture signal. 37 // Aligns the render buffer content with the capture signal.
38 virtual size_t GetDelay(const DownsampledRenderBuffer& render_buffer, 38 virtual size_t GetDelay(const DownsampledRenderBuffer& render_buffer,
39 rtc::ArrayView<const float> capture) = 0; 39 rtc::ArrayView<const float> capture) = 0;
40 40
41 // Returns an approximate value for the headroom in the buffer alignment. 41 // Returns an approximate value for the headroom in the buffer alignment.
42 virtual rtc::Optional<size_t> AlignmentHeadroomSamples() const = 0; 42 virtual rtc::Optional<size_t> AlignmentHeadroomSamples() const = 0;
43 }; 43 };
44 } // namespace webrtc 44 } // namespace webrtc
45 45
46 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_RENDER_DELAY_CONTROLLER_H_ 46 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_RENDER_DELAY_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698