Index: webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader.cc |
diff --git a/webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader_factory.cc b/webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader.cc |
similarity index 56% |
copy from webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader_factory.cc |
copy to webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader.cc |
index 1097639527b92891f36b8ab3618a3594118c8e1e..7d2f2b663e9e5509ba5f1120c66d23e82c5ff751 100644 |
--- a/webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader_factory.cc |
+++ b/webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader.cc |
@@ -8,15 +8,24 @@ |
* be found in the AUTHORS file in the root of the source tree. |
*/ |
-#include "webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader_factory.h" |
+#include "webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader.h" |
namespace webrtc { |
namespace test { |
namespace conversational_speech { |
-MockWavReaderFactory::MockWavReaderFactory() = default; |
+using testing::Return; |
-MockWavReaderFactory::~MockWavReaderFactory() = default; |
+MockWavReader::MockWavReader( |
+ int sample_rate, size_t num_channels, size_t num_samples) |
+ : sample_rate_(sample_rate), num_channels_(num_channels), |
+ num_samples_(num_samples) { |
+ ON_CALL(*this, sample_rate()).WillByDefault(Return(sample_rate_)); |
+ ON_CALL(*this, num_channels()).WillByDefault(Return(num_channels_)); |
+ ON_CALL(*this, num_samples()).WillByDefault(Return(num_samples_)); |
+} |
+ |
+MockWavReader::~MockWavReader() = default; |
} // namespace conversational_speech |
} // namespace test |