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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef WEBKIT_GLUE_WEBAUDIODEVICE_IMPL_H_
6 #define WEBKIT_GLUE_WEBAUDIODEVICE_IMPL_H_
7
8 #include <vector>
9
10 #include "chrome/renderer/audio_device.h"
11 #include "third_party/WebKit/WebKit/chromium/public/WebAudioDevice.h"
12 #include "third_party/WebKit/WebKit/chromium/public/WebVector.h"
13
14 namespace webkit_glue {
15
16 class WebAudioDeviceImpl : public WebKit::WebAudioDevice,
17 public AudioDevice::RenderCallback {
18 public:
19 WebAudioDeviceImpl(size_t buffer_size,
20 int channels,
21 double sample_rate,
22 WebKit::WebAudioDevice::RenderCallback* callback);
23 virtual ~WebAudioDeviceImpl();
24
25 // WebKit::WebAudioDevice implementation.
26 virtual void start();
27 virtual void stop();
28
29 // AudioDevice::RenderCallback implementation.
30 void Render(const std::vector<float*>& audio_data, size_t number_of_frames);
31
32 private:
33 AudioDevice audio_device_;
34
35 // Weak reference to the callback into WebKit code.
36 WebKit::WebAudioDevice::RenderCallback* client_callback_;
37
38 DISALLOW_COPY_AND_ASSIGN(WebAudioDeviceImpl);
39 };
40
41 } // namespace webkit_glue
42
43 #endif // WEBKIT_GLUE_WEBAUDIODEVICE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698