| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2017 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 |
| 11 #include "webrtc/modules/audio_processing/test/conversational_speech/wavreader_a
daptor.h" | 11 #include "webrtc/modules/audio_processing/test/conversational_speech/wavreader_a
daptor.h" |
| 12 | 12 |
| 13 #include "webrtc/base/checks.h" | 13 #include "webrtc/base/checks.h" |
| 14 | 14 |
| 15 namespace webrtc { | 15 namespace webrtc { |
| 16 namespace test { | 16 namespace test { |
| 17 namespace conversational_speech { | 17 namespace conversational_speech { |
| 18 | 18 |
| 19 WavReaderAdaptor::WavReaderAdaptor(const std::string& filepath) { | 19 WavReaderAdaptor::WavReaderAdaptor(const std::string& filepath) |
| 20 // TODO(alessiob): implement. | 20 : wav_reader_(filepath) {} |
| 21 } | |
| 22 | 21 |
| 23 WavReaderAdaptor::~WavReaderAdaptor() {} | 22 WavReaderAdaptor::~WavReaderAdaptor() {} |
| 24 | 23 |
| 25 size_t WavReaderAdaptor::ReadFloatSamples(size_t num_samples, float* samples) { | 24 size_t WavReaderAdaptor::ReadFloatSamples(size_t num_samples, float* samples) { |
| 26 // TODO(alessiob): implement. | 25 return wav_reader_.ReadSamples(num_samples, samples); |
| 27 FATAL(); | |
| 28 return 0u; | |
| 29 } | 26 } |
| 30 | 27 |
| 31 size_t WavReaderAdaptor::ReadInt16Samples( | 28 size_t WavReaderAdaptor::ReadInt16Samples( |
| 32 size_t num_samples, int16_t* samples) { | 29 size_t num_samples, int16_t* samples) { |
| 33 // TODO(alessiob): implement. | 30 return wav_reader_.ReadSamples(num_samples, samples); |
| 34 FATAL(); | |
| 35 return 0u; | |
| 36 } | 31 } |
| 37 | 32 |
| 38 int WavReaderAdaptor::sample_rate() const { | 33 int WavReaderAdaptor::sample_rate() const { |
| 39 // TODO(alessiob): implement. | 34 return wav_reader_.sample_rate(); |
| 40 FATAL(); | |
| 41 return 0; | |
| 42 } | 35 } |
| 43 | 36 |
| 44 size_t WavReaderAdaptor::num_channels() const { | 37 size_t WavReaderAdaptor::num_channels() const { |
| 45 // TODO(alessiob): implement. | 38 return wav_reader_.num_channels(); |
| 46 FATAL(); | |
| 47 return 0u; | |
| 48 } | 39 } |
| 49 | 40 |
| 50 size_t WavReaderAdaptor::num_samples() const { | 41 size_t WavReaderAdaptor::num_samples() const { |
| 51 // TODO(alessiob): implement. | 42 return wav_reader_.num_samples(); |
| 52 FATAL(); | |
| 53 return 0u; | |
| 54 } | 43 } |
| 55 | 44 |
| 56 } // namespace conversational_speech | 45 } // namespace conversational_speech |
| 57 } // namespace test | 46 } // namespace test |
| 58 } // namespace webrtc | 47 } // namespace webrtc |
| OLD | NEW |