Clean up LappedTransform and Blocker.
- Remove unnecessary window member from lapped_transform.
- Add comment indicated that Blocker does not take ownership of
the window passed to its constructor.
- Streamline LappedTransform constructor so members can be const.
Also use a range-based for loop in audio_processing_impl.cc for clarity.
R=aluebs@webrtc.org, andrew@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/41229004
Cr-Commit-Position: refs/heads/master@{#8708}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8708 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -42,14 +42,13 @@ class ChannelBuffer {
|
||||
ChannelBuffer(int num_frames,
|
||||
int num_channels,
|
||||
int num_bands = 1)
|
||||
: data_(new T[num_frames * num_channels]),
|
||||
: data_(new T[num_frames * num_channels]()),
|
||||
channels_(new T*[num_channels * num_bands]),
|
||||
bands_(new T*[num_channels * num_bands]),
|
||||
num_frames_(num_frames),
|
||||
num_frames_per_band_(num_frames / num_bands),
|
||||
num_channels_(num_channels),
|
||||
num_bands_(num_bands) {
|
||||
memset(data_.get(), 0, size() * sizeof(T));
|
||||
for (int i = 0; i < num_channels_; ++i) {
|
||||
for (int j = 0; j < num_bands_; ++j) {
|
||||
channels_[j * num_channels_ + i] =
|
||||
|
||||
Reference in New Issue
Block a user