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

Unified Diff: webkit/glue/webaudiodevice_impl.h

Issue 6002005: Implement renderer AudioDevice API for low-latency audio output... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 12 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: webkit/glue/webaudiodevice_impl.h
===================================================================
--- webkit/glue/webaudiodevice_impl.h (revision 0)
+++ webkit/glue/webaudiodevice_impl.h (revision 0)
@@ -0,0 +1,38 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WEBKIT_GLUE_WEBAUDIODEVICE_IMPL_H_
+#define WEBKIT_GLUE_WEBAUDIODEVICE_IMPL_H_
+
+#include <vector>
scherkus (not reviewing) 2011/01/10 23:42:32 nit: blank line after system includes
Chris Rogers 2011/01/11 23:01:02 Done.
+#include "third_party/WebKit/WebKit/chromium/public/WebAudioDevice.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebVector.h"
+#include "chrome/renderer/audio_device.h"
neb 2011/01/10 23:11:57 c before t
Chris Rogers 2011/01/11 23:01:02 Done.
+
+namespace webkit_glue {
+
+class WebAudioDeviceImpl : public WebKit::WebAudioDevice,
+ public AudioDevice::RenderCallback {
+ public:
+ WebAudioDeviceImpl(size_t buffer_size,
+ unsigned channels,
scherkus (not reviewing) 2011/01/10 23:42:32 unsigned -> int (to match AudioDevice)
Chris Rogers 2011/01/11 23:01:02 Done.
+ double sample_rate,
+ WebKit::WebAudioDevice::RenderCallback* callback);
+ virtual ~WebAudioDeviceImpl();
+
+ // WebKit::WebAudioDevice implementation
+ virtual void start();
+ virtual void stop();
+ // End of WebKit::WebAudioDevice implementation
scherkus (not reviewing) 2011/01/10 23:42:32 nit: no need for this comment
Chris Rogers 2011/01/11 23:01:02 Done.
+
+ void render(const std::vector<float*>& audio_data, size_t number_of_frames);
scherkus (not reviewing) 2011/01/10 23:42:32 should have an implementation comment
Chris Rogers 2011/01/11 23:01:02 Done.
+
+ private:
+ AudioDevice audio_device_;
+ WebKit::WebAudioDevice::RenderCallback* client_callback_;
scherkus (not reviewing) 2011/01/10 23:42:32 sanity check: who's responsible for deleting the c
Chris Rogers 2011/01/11 23:01:02 Added a comment about this being a weak reference.
+};
scherkus (not reviewing) 2011/01/10 23:42:32 DISALLOW_COPY_AND_ASSIGN
Chris Rogers 2011/01/11 23:01:02 Done.
+
+} // namespace webkit_glue
+
+#endif // WEBKIT_GLUE_WEBAUDIODEVICE_IMPL_H_
Property changes on: webkit/glue/webaudiodevice_impl.h
___________________________________________________________________
Added: svn:eol-style
+ LF

Powered by Google App Engine
This is Rietveld 408576698