Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 |
| OLD | NEW |