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

Unified Diff: content/renderer/media/audio_device.h

Issue 7631033: Very early implementation for HTMLMediaElement / Web Audio API integration (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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/renderer/media/audio_device.h
===================================================================
--- content/renderer/media/audio_device.h (revision 96995)
+++ content/renderer/media/audio_device.h (working copy)
@@ -57,10 +57,8 @@
struct AudioParameters;
-class AudioDevice
- : public AudioMessageFilter::Delegate,
- public base::DelegateSimpleThread::Delegate,
- public base::RefCountedThreadSafe<AudioDevice> {
+
+class AudioSink : public base::RefCountedThreadSafe<AudioSink> {
scherkus (not reviewing) 2011/08/23 15:16:01 what's the reasoning behind using an AudioSink as
Chris Rogers 2011/08/24 00:41:52 The idea is that there can be more than one kind o
public:
class RenderCallback {
public:
@@ -71,6 +69,24 @@
virtual ~RenderCallback() {}
};
+ // Starts audio playback. Returns |true| on success.
+ virtual bool Start() = 0;
+
+ // Stops audio playback. Returns |true| on success.
+ virtual bool Stop() = 0;
+
+ // Sets the playback volume, with range [0.0, 1.0] inclusive.
+ // Returns |true| on success.
+ virtual bool SetVolume(double volume) = 0;
+};
+
+
+class AudioDevice
+ : public AudioMessageFilter::Delegate,
+ public base::DelegateSimpleThread::Delegate,
+ public AudioSink {
+ public:
+
// Methods called on main render thread -------------------------------------
AudioDevice(size_t buffer_size,
int channels,

Powered by Google App Engine
This is Rietveld 408576698