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

Unified Diff: webrtc/modules/audio_processing/test/conversational_speech/wavreader_adaptor.cc

Issue 2774423005: Conversational Speech tool, WavReaderAdaptor and unit test (Closed)
Patch Set: Created 3 years, 9 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/wavreader_adaptor.cc
diff --git a/webrtc/modules/audio_processing/test/conversational_speech/wavreader_adaptor.cc b/webrtc/modules/audio_processing/test/conversational_speech/wavreader_adaptor.cc
index b441a044eea65a03f71586c9623c70b3feacdad7..5457dbb455ca28d2e4513d80a984579b1ad25e64 100644
--- a/webrtc/modules/audio_processing/test/conversational_speech/wavreader_adaptor.cc
+++ b/webrtc/modules/audio_processing/test/conversational_speech/wavreader_adaptor.cc
@@ -16,41 +16,30 @@ namespace webrtc {
namespace test {
namespace conversational_speech {
-WavReaderAdaptor::WavReaderAdaptor(const std::string& filepath) {
- // TODO(alessiob): implement.
-}
+WavReaderAdaptor::WavReaderAdaptor(const std::string& filepath)
+ : wav_reader_(filepath) {}
WavReaderAdaptor::~WavReaderAdaptor() {}
size_t WavReaderAdaptor::ReadFloatSamples(size_t num_samples, float* samples) {
- // TODO(alessiob): implement.
- FATAL();
- return 0u;
+ return wav_reader_.ReadSamples(num_samples, samples);
}
size_t WavReaderAdaptor::ReadInt16Samples(
size_t num_samples, int16_t* samples) {
- // TODO(alessiob): implement.
- FATAL();
- return 0u;
+ return wav_reader_.ReadSamples(num_samples, samples);
}
int WavReaderAdaptor::sample_rate() const {
- // TODO(alessiob): implement.
- FATAL();
- return 0;
+ return wav_reader_.sample_rate();
}
size_t WavReaderAdaptor::num_channels() const {
- // TODO(alessiob): implement.
- FATAL();
- return 0u;
+ return wav_reader_.num_channels();
}
size_t WavReaderAdaptor::num_samples() const {
- // TODO(alessiob): implement.
- FATAL();
- return 0u;
+ return wav_reader_.num_samples();
}
} // namespace conversational_speech

Powered by Google App Engine
This is Rietveld 408576698