Chromium Code Reviews| 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 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_WAVREADER_ADA PTOR_H_ | 11 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_WAVREADER_ADA PTOR_H_ |
| 12 #define WEBRTC_MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_WAVREADER_ADA PTOR_H_ | 12 #define WEBRTC_MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_WAVREADER_ADA PTOR_H_ |
| 13 | 13 |
| 14 #include "webrtc/modules/audio_processing/test/conversational_speech/wavreader_i nterface.h" | 14 #include "webrtc/modules/audio_processing/test/conversational_speech/wavreader_i nterface.h" |
| 15 | 15 |
| 16 #include <cstddef> | 16 #include <cstddef> |
| 17 #include <string> | 17 #include <string> |
| 18 | 18 |
| 19 #include "webrtc/common_audio/wav_file.h" | |
| 19 #include "webrtc/typedefs.h" | 20 #include "webrtc/typedefs.h" |
| 20 | 21 |
| 21 namespace webrtc { | 22 namespace webrtc { |
| 22 namespace test { | 23 namespace test { |
| 23 namespace conversational_speech { | 24 namespace conversational_speech { |
| 24 | 25 |
| 25 class WavReaderAdaptor : public WavReaderInterface { | 26 class WavReaderAdaptor : public WavReaderInterface { |
| 26 public: | 27 public: |
| 27 explicit WavReaderAdaptor(const std::string& filepath); | 28 explicit WavReaderAdaptor(const std::string& filepath); |
| 28 ~WavReaderAdaptor() override; | 29 ~WavReaderAdaptor() override; |
| 29 | 30 |
| 30 size_t ReadFloatSamples(size_t num_samples, float* samples) override; | 31 size_t ReadFloatSamples(size_t num_samples, float* samples) override; |
| 31 size_t ReadInt16Samples(size_t num_samples, int16_t* samples) override; | 32 size_t ReadInt16Samples(size_t num_samples, int16_t* samples) override; |
|
kwiberg-webrtc
2017/03/28 17:52:45
Not this CL's fault, but the arguments here really
AleBzk
2017/03/29 08:56:45
Done.
| |
| 32 | 33 |
| 33 int sample_rate() const override; | 34 int sample_rate() const override; |
| 34 size_t num_channels() const override; | 35 size_t num_channels() const override; |
| 35 size_t num_samples() const override; | 36 size_t num_samples() const override; |
| 37 private: | |
| 38 WavReader wav_reader_; | |
|
kwiberg-webrtc
2017/03/28 17:52:45
When you add this private member variable, you hav
AleBzk
2017/03/29 08:56:45
Done.
| |
| 36 }; | 39 }; |
| 37 | 40 |
| 38 } // namespace conversational_speech | 41 } // namespace conversational_speech |
| 39 } // namespace test | 42 } // namespace test |
| 40 } // namespace webrtc | 43 } // namespace webrtc |
| 41 | 44 |
| 42 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_WAVREADER_ ADAPTOR_H_ | 45 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_WAVREADER_ ADAPTOR_H_ |
| OLD | NEW |