| 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 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 namespace webrtc { | 22 namespace webrtc { |
| 23 namespace test { | 23 namespace test { |
| 24 namespace conversational_speech { | 24 namespace conversational_speech { |
| 25 | 25 |
| 26 class MockWavReader : public WavReaderInterface { | 26 class MockWavReader : public WavReaderInterface { |
| 27 public: | 27 public: |
| 28 MockWavReader(int sample_rate, size_t num_channels, size_t num_samples); | 28 MockWavReader(int sample_rate, size_t num_channels, size_t num_samples); |
| 29 ~MockWavReader(); | 29 ~MockWavReader(); |
| 30 | 30 |
| 31 // TODO(alessiob): use ON_CALL to return random samples. | 31 // TODO(alessiob): use ON_CALL to return random samples if needed. |
| 32 MOCK_METHOD1(ReadFloatSamples, size_t(rtc::ArrayView<float>)); | 32 MOCK_METHOD1(ReadFloatSamples, size_t(rtc::ArrayView<float>)); |
| 33 MOCK_METHOD1(ReadInt16Samples, size_t(rtc::ArrayView<int16_t>)); | 33 MOCK_METHOD1(ReadInt16Samples, size_t(rtc::ArrayView<int16_t>)); |
| 34 | 34 |
| 35 MOCK_CONST_METHOD0(SampleRate, int()); | 35 MOCK_CONST_METHOD0(SampleRate, int()); |
| 36 MOCK_CONST_METHOD0(NumChannels, size_t()); | 36 MOCK_CONST_METHOD0(NumChannels, size_t()); |
| 37 MOCK_CONST_METHOD0(NumSamples, size_t()); | 37 MOCK_CONST_METHOD0(NumSamples, size_t()); |
| 38 | 38 |
| 39 private: | 39 private: |
| 40 const int sample_rate_; | 40 const int sample_rate_; |
| 41 const size_t num_channels_; | 41 const size_t num_channels_; |
| 42 const size_t num_samples_; | 42 const size_t num_samples_; |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 } // namespace conversational_speech | 45 } // namespace conversational_speech |
| 46 } // namespace test | 46 } // namespace test |
| 47 } // namespace webrtc | 47 } // namespace webrtc |
| 48 | 48 |
| 49 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_MOCK_WAVRE
ADER_H_ | 49 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_CONVERSATIONAL_SPEECH_MOCK_WAVRE
ADER_H_ |
| OLD | NEW |