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

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

Issue 2582703003: Audio output debug recording. (Closed)
Patch Set: Code review. Rebase. 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..6b0a444b50adaed7b1f87e0989354b0666c64ddd 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;
+ std::string GetExtension() override;
o1ka 2017/02/09 13:04:02 GetFileNameExtension() would be more descriptive.
Henrik Grunell 2017/02/10 09:00:56 Agree, changed.
private:
class AudioFileWriter;

Powered by Google App Engine
This is Rietveld 408576698