Chromium Code Reviews| Index: webrtc/modules/audio_processing/test/test_utils.h |
| diff --git a/webrtc/modules/audio_processing/test/test_utils.h b/webrtc/modules/audio_processing/test/test_utils.h |
| index 8dd380b15da3f131b91e7548bc12961a1470efbd..8995d0a63fdae37e00db6df3a61a5c96bcf0d10f 100644 |
| --- a/webrtc/modules/audio_processing/test/test_utils.h |
| +++ b/webrtc/modules/audio_processing/test/test_utils.h |
| @@ -43,6 +43,19 @@ class RawFile final { |
| RTC_DISALLOW_COPY_AND_ASSIGN(RawFile); |
| }; |
| +// Writes ChannelBuffers to a provided WavWriter. |
| +class ChannelBufferWavWriter final { |
| + public: |
| + explicit ChannelBufferWavWriter(rtc::scoped_ptr<WavWriter> file); |
|
aluebs-webrtc
2015/10/24 00:53:35
Why does this needs to be passed in? Can't we just
aluebs-webrtc
2015/10/29 01:03:20
Missed this comment? I have the same question rega
Andrew MacDonald
2015/10/29 01:14:33
I'm currently using this in a very specific contex
aluebs-webrtc
2015/10/30 01:26:59
Sounds reasonable. Agreed.
|
| + void Write(const ChannelBuffer<float>& buffer); |
| + |
| + private: |
| + rtc::scoped_ptr<WavWriter> file_; |
| + std::vector<float> interleaved_; |
| + |
| + RTC_DISALLOW_COPY_AND_ASSIGN(ChannelBufferWavWriter); |
| +}; |
| + |
| void WriteIntData(const int16_t* data, |
| size_t length, |
| WavWriter* wav_file, |
| @@ -118,6 +131,9 @@ std::vector<T> ParseList(const std::string& to_parse) { |
| std::vector<Point> ParseArrayGeometry(const std::string& mic_positions, |
| size_t num_mics); |
| +// Same as above, but without the num_mics check for when it isn't available. |
| +std::vector<Point> ParseArrayGeometry(const std::string& mic_positions); |
| + |
| } // namespace webrtc |
| #endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_TEST_UTILS_H_ |