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/common_audio/wav_file.h b/common_audio/wav_file.h
index f7afe92..befe733 100644
--- a/common_audio/wav_file.h
+++ b/common_audio/wav_file.h
@@ -18,6 +18,7 @@
 #include <string>
 
 #include "rtc_base/constructormagic.h"
+#include "rtc_base/platform_file.h"
 
 namespace webrtc {
 
@@ -41,6 +42,9 @@
   // Open a new WAV file for writing.
   WavWriter(const std::string& filename, int sample_rate, size_t num_channels);
 
+  // Open a new WAV file for writing.
+  WavWriter(rtc::PlatformFile file, int sample_rate, size_t num_channels);
+
   // Close the WAV file, after writing its header.
   ~WavWriter() override;
 
@@ -70,6 +74,9 @@
   // Opens an existing WAV file for reading.
   explicit WavReader(const std::string& filename);
 
+  // Opens an existing WAV file for reading.
+  explicit WavReader(rtc::PlatformFile file);
+
   // Close the WAV file.
   ~WavReader() override;