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

Side by Side Diff: webrtc/common_audio/blocker.h

Issue 1726043002: Revert of Replace scoped_ptr with unique_ptr in webrtc/common_audio/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 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) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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_INTERNAL_BEAMFORMER_BLOCKER_H_ 11 #ifndef WEBRTC_INTERNAL_BEAMFORMER_BLOCKER_H_
12 #define WEBRTC_INTERNAL_BEAMFORMER_BLOCKER_H_ 12 #define WEBRTC_INTERNAL_BEAMFORMER_BLOCKER_H_
13 13
14 #include <memory> 14 #include "webrtc/base/scoped_ptr.h"
15
16 #include "webrtc/common_audio/audio_ring_buffer.h" 15 #include "webrtc/common_audio/audio_ring_buffer.h"
17 #include "webrtc/common_audio/channel_buffer.h" 16 #include "webrtc/common_audio/channel_buffer.h"
18 17
19 namespace webrtc { 18 namespace webrtc {
20 19
21 // The callback function to process audio in the time domain. Input has already 20 // The callback function to process audio in the time domain. Input has already
22 // been windowed, and output will be windowed. The number of input channels 21 // been windowed, and output will be windowed. The number of input channels
23 // must be >= the number of output channels. 22 // must be >= the number of output channels.
24 class BlockerCallback { 23 class BlockerCallback {
25 public: 24 public:
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 // AudioRingBuffer for the output. 102 // AudioRingBuffer for the output.
104 AudioRingBuffer input_buffer_; 103 AudioRingBuffer input_buffer_;
105 ChannelBuffer<float> output_buffer_; 104 ChannelBuffer<float> output_buffer_;
106 105
107 // Space for the input block (can't wrap because of windowing). 106 // Space for the input block (can't wrap because of windowing).
108 ChannelBuffer<float> input_block_; 107 ChannelBuffer<float> input_block_;
109 108
110 // Space for the output block (can't wrap because of overlap/add). 109 // Space for the output block (can't wrap because of overlap/add).
111 ChannelBuffer<float> output_block_; 110 ChannelBuffer<float> output_block_;
112 111
113 std::unique_ptr<float[]> window_; 112 rtc::scoped_ptr<float[]> window_;
114 113
115 // The amount of frames between the start of contiguous blocks. For example, 114 // The amount of frames between the start of contiguous blocks. For example,
116 // |shift_amount_| = |block_size_| / 2 for a Hann window. 115 // |shift_amount_| = |block_size_| / 2 for a Hann window.
117 size_t shift_amount_; 116 size_t shift_amount_;
118 117
119 BlockerCallback* callback_; 118 BlockerCallback* callback_;
120 }; 119 };
121 120
122 } // namespace webrtc 121 } // namespace webrtc
123 122
124 #endif // WEBRTC_INTERNAL_BEAMFORMER_BLOCKER_H_ 123 #endif // WEBRTC_INTERNAL_BEAMFORMER_BLOCKER_H_
OLDNEW
« no previous file with comments | « webrtc/common_audio/audio_ring_buffer_unittest.cc ('k') | webrtc/common_audio/blocker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698