Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(827)

Unified Diff: webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader.h

Issue 2774423005: Conversational Speech tool, WavReaderAdaptor and unit test (Closed)
Patch Set: BUILD deps fixed Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader.h
diff --git a/webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader.h b/webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader.h
index d71e6f896b9eca22227d7bbd522e0ad51d5d4637..030e163e80a135eda4e20a9bb1b3a299087cacc4 100644
--- a/webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader.h
+++ b/webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader.h
@@ -14,6 +14,7 @@
#include <cstddef>
#include <string>
+#include "webrtc/base/array_view.h"
#include "webrtc/modules/audio_processing/test/conversational_speech/wavreader_interface.h"
#include "webrtc/test/gmock.h"
#include "webrtc/typedefs.h"
@@ -28,12 +29,12 @@ class MockWavReader : public WavReaderInterface {
~MockWavReader();
// TODO(alessiob): use ON_CALL to return random samples.
- MOCK_METHOD2(ReadFloatSamples, size_t(size_t, float*));
- MOCK_METHOD2(ReadInt16Samples, size_t(size_t, int16_t*));
+ MOCK_METHOD1(ReadFloatSamples, size_t(rtc::ArrayView<float>));
+ MOCK_METHOD1(ReadInt16Samples, size_t(rtc::ArrayView<int16_t>));
- MOCK_CONST_METHOD0(sample_rate, int());
- MOCK_CONST_METHOD0(num_channels, size_t());
- MOCK_CONST_METHOD0(num_samples, size_t());
+ MOCK_CONST_METHOD0(SampleRate, int());
+ MOCK_CONST_METHOD0(NumChannels, size_t());
+ MOCK_CONST_METHOD0(NumSamples, size_t());
private:
const int sample_rate_;

Powered by Google App Engine
This is Rietveld 408576698