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

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, 11 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,44 @@
+// 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>
+
+#include "base/scoped_ptr.h"
+#include "chrome/renderer/audio_device.h"
scherkus (not reviewing) 2011/01/12 21:32:10 nit: if audio_device_ is now a pointer I think we
+#include "third_party/WebKit/WebKit/chromium/public/WebAudioDevice.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebVector.h"
+
+namespace webkit_glue {
+
+class WebAudioDeviceImpl : public WebKit::WebAudioDevice,
+ public AudioDevice::RenderCallback {
+ public:
+ WebAudioDeviceImpl(size_t buffer_size,
+ int channels,
+ double sample_rate,
+ WebKit::WebAudioDevice::RenderCallback* callback);
+ virtual ~WebAudioDeviceImpl();
+
+ // WebKit::WebAudioDevice implementation.
+ virtual void start();
+ virtual void stop();
+
+ // AudioDevice::RenderCallback implementation.
+ void Render(const std::vector<float*>& audio_data, size_t number_of_frames);
+
+ private:
+ scoped_ptr<AudioDevice> audio_device_;
+
+ // Weak reference to the callback into WebKit code.
+ WebKit::WebAudioDevice::RenderCallback* client_callback_;
+
+ DISALLOW_COPY_AND_ASSIGN(WebAudioDeviceImpl);
+};
+
+} // 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