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 |