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

Unified Diff: content/browser/renderer_host/media/audio_debug_file_writer.h

Issue 2582703003: Audio output debug recording. (Closed)
Patch Set: Two more fixes. Created 3 years, 10 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: content/browser/renderer_host/media/audio_debug_file_writer.h
diff --git a/content/browser/renderer_host/media/audio_debug_file_writer.h b/content/browser/renderer_host/media/audio_debug_file_writer.h
index 1ef10f186b18553f73abb4704db74359396bf592..07a2e81d41daae7be6e4281b098c65714610de6d 100644
--- a/content/browser/renderer_host/media/audio_debug_file_writer.h
+++ b/content/browser/renderer_host/media/audio_debug_file_writer.h
@@ -25,18 +25,25 @@ class AudioBus;
namespace content {
-// Writes audio input data used for debugging purposes. All operations are
-// non-blocking.
+// Writes audio data to a 16 bit PCM WAVE file used for debugging purposes. All
+// operations are non-blocking.
class CONTENT_EXPORT AudioDebugFileWriter
: public NON_EXPORTED_BASE(media::AudioFileWriter) {
public:
explicit AudioDebugFileWriter(const media::AudioParameters& params);
~AudioDebugFileWriter() override;
+ // Number of channels and sample rate are used from |params|, the other
+ // parameters are ignored. The number of channels in the data passed to
+ // Write() must match |params|.
+ static std::unique_ptr<media::AudioFileWriter> Create(
+ const media::AudioParameters& params);
+
void Start(const base::FilePath& file) override;
void Stop() override;
void Write(std::unique_ptr<media::AudioBus> data) override;
bool WillWrite() override;
+ const base::FilePath::CharType* GetFileNameExtension() override;
private:
class AudioFileWriter;

Powered by Google App Engine
This is Rietveld 408576698