Extend WavReader and WavWriter API.

Add ability to read and write wav files using rtc::PlatformFile instead
of file name.

Bug: webrtc:8946
Change-Id: If18d9465f2155a33547f800edbdac45971a0e878
Reviewed-on: https://webrtc-review.googlesource.com/61424
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22497}
diff --git a/test/testsupport/fileutils.cc b/test/testsupport/fileutils.cc
index 2aff75a..309c885 100644
--- a/test/testsupport/fileutils.cc
+++ b/test/testsupport/fileutils.cc
@@ -215,6 +215,13 @@
 #endif
 }
 
+std::string GenerateTempFilename(const std::string& dir,
+                                 const std::string& prefix) {
+  std::string filename = TempFilename(dir, prefix);
+  RemoveFile(filename);
+  return filename;
+}
+
 rtc::Optional<std::vector<std::string>> ReadDirectory(std::string path) {
   if (path.length() == 0)
     return rtc::Optional<std::vector<std::string>>();