| OLD | NEW |
| 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 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 out_file.num_channels()); | 66 out_file.num_channels()); |
| 67 | 67 |
| 68 std::vector<float> interleaved(in_buf.size()); | 68 std::vector<float> interleaved(in_buf.size()); |
| 69 while (in_file.ReadSamples(interleaved.size(), | 69 while (in_file.ReadSamples(interleaved.size(), |
| 70 &interleaved[0]) == interleaved.size()) { | 70 &interleaved[0]) == interleaved.size()) { |
| 71 FloatS16ToFloat(&interleaved[0], interleaved.size(), &interleaved[0]); | 71 FloatS16ToFloat(&interleaved[0], interleaved.size(), &interleaved[0]); |
| 72 Deinterleave(&interleaved[0], in_buf.num_frames(), | 72 Deinterleave(&interleaved[0], in_buf.num_frames(), |
| 73 in_buf.num_channels(), in_buf.channels()); | 73 in_buf.num_channels(), in_buf.channels()); |
| 74 | 74 |
| 75 bf.ProcessChunk(in_buf, &out_buf); | 75 bf.ProcessChunk(in_buf, &out_buf); |
| 76 bf.PostFilter(out_buf, &out_buf); |
| 76 | 77 |
| 77 Interleave(out_buf.channels(), out_buf.num_frames(), | 78 Interleave(out_buf.channels(), out_buf.num_frames(), |
| 78 out_buf.num_channels(), &interleaved[0]); | 79 out_buf.num_channels(), &interleaved[0]); |
| 79 FloatToFloatS16(&interleaved[0], interleaved.size(), &interleaved[0]); | 80 FloatToFloatS16(&interleaved[0], interleaved.size(), &interleaved[0]); |
| 80 out_file.WriteSamples(&interleaved[0], interleaved.size()); | 81 out_file.WriteSamples(&interleaved[0], interleaved.size()); |
| 81 } | 82 } |
| 82 | 83 |
| 83 return 0; | 84 return 0; |
| 84 } | 85 } |
| 85 | 86 |
| 86 } // namespace webrtc | 87 } // namespace webrtc |
| 87 | 88 |
| 88 int main(int argc, char* argv[]) { | 89 int main(int argc, char* argv[]) { |
| 89 return webrtc::main(argc, argv); | 90 return webrtc::main(argc, argv); |
| 90 } | 91 } |
| OLD | NEW |