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

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

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