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

Side by Side Diff: webrtc/modules/audio_processing/test/audio_buffer_tools.cc

Issue 1783203002: Bitexactness test for the noise suppressor (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Corrected comments Created 4 years, 9 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) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 20 matching lines...) Expand all
31 std::vector<float> input_samples; 31 std::vector<float> input_samples;
32 32
33 SetupFrame(stream_config, &input, &input_samples); 33 SetupFrame(stream_config, &input, &input_samples);
34 34
35 RTC_DCHECK_EQ(input_samples.size(), source.size()); 35 RTC_DCHECK_EQ(input_samples.size(), source.size());
36 input_samples = source; 36 input_samples = source;
37 37
38 destination->CopyFrom(&input[0], stream_config); 38 destination->CopyFrom(&input[0], stream_config);
39 } 39 }
40 40
41 std::vector<float> ExtractVectorFromAudioBuffer( 41 void ExtractVectorFromAudioBuffer(const StreamConfig& stream_config,
42 const StreamConfig& stream_config, 42 AudioBuffer* source,
hlundin-webrtc 2016/03/16 12:44:28 Since you are changing the signature, can the inpu
peah-webrtc 2016/03/17 13:15:01 Unfortunately not :-(. This is because the CopyTo
hlundin-webrtc 2016/03/17 14:14:40 Acknowledged.
43 AudioBuffer* source) { 43 std::vector<float>* destination) {
44 std::vector<float*> output; 44 std::vector<float*> output;
45 std::vector<float> output_samples;
46 45
47 SetupFrame(stream_config, &output, &output_samples); 46 SetupFrame(stream_config, &output, destination);
48 47
49 source->CopyTo(stream_config, &output[0]); 48 source->CopyTo(stream_config, &output[0]);
50
51 return output_samples;
52 } 49 }
53 50
54 } // namespace test 51 } // namespace test
55 } // namespace webrtc 52 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698