Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 /* | |
| 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | |
| 3 * | |
| 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 | |
| 6 * tree. An additional intellectual property rights grant can be found | |
| 7 * in the file PATENTS. All contributing project authors may | |
| 8 * be found in the AUTHORS file in the root of the source tree. | |
| 9 */ | |
| 10 | |
| 11 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_BLOCK_FRAMER_H_ | |
| 12 #define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_BLOCK_FRAMER_H_ | |
| 13 | |
| 14 #include <vector> | |
| 15 | |
| 16 #include "webrtc/base/array_view.h" | |
| 17 #include "webrtc/base/constructormagic.h" | |
| 18 #include "webrtc/modules/audio_processing/aec3/aec3_constants.h" | |
| 19 | |
| 20 namespace webrtc { | |
| 21 | |
| 22 /* Class for producing 10 ms second frames from 64 sample blocks */ | |
|
hlundin-webrtc
2016/12/16 10:04:46
Use // style comments.
hlundin-webrtc
2016/12/16 10:04:46
I'd like to see a little bit more of an explanatio
aleloi
2016/12/16 15:04:31
Remove 'second'
peah-webrtc
2016/12/20 10:10:24
I improved it a bit.
PTAL
peah-webrtc
2016/12/20 10:10:24
Done.
peah-webrtc
2016/12/20 10:10:24
Done.
| |
| 23 class BlockFramer { | |
| 24 public: | |
| 25 BlockFramer(size_t num_bands, size_t frame_length); | |
| 26 ~BlockFramer(); | |
| 27 void InsertBlock(rtc::ArrayView<const float> block); | |
| 28 void ExtractFrame(size_t sub_frame_index, float* const* frame); | |
|
hlundin-webrtc
2016/12/16 10:04:46
Comment, please.
aleloi
2016/12/16 15:04:31
Maybe document the threading model and use base/th
peah-webrtc
2016/12/20 10:10:24
I don't think we should add thread annotations as
peah-webrtc
2016/12/20 10:10:24
Done.
| |
| 29 | |
| 30 private: | |
| 31 const size_t kMaxSize = 2 * kBlockSize; | |
|
hlundin-webrtc
2016/12/16 10:04:46
constexpr
peah-webrtc
2016/12/20 10:10:24
Done.
| |
| 32 const size_t num_bands_; | |
| 33 const size_t frame_length_; | |
| 34 std::vector<float> buffer_; | |
| 35 size_t buffer_size_; | |
| 36 | |
| 37 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(BlockFramer); | |
| 38 }; | |
| 39 } // namespace webrtc | |
| 40 | |
| 41 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_BLOCK_FRAMER_H_ | |
| OLD | NEW |