summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/webaudio/AudioDestinationNode.h
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-06-02 12:07:03 +0100
committerBen Murdoch <benm@google.com>2011-06-10 10:47:21 +0100
commit2daae5fd11344eaa88a0d92b0f6d65f8d2255c00 (patch)
treee4964fbd1cb70599f7718ff03e50ea1dab33890b /Source/WebCore/webaudio/AudioDestinationNode.h
parent87bdf0060a247bfbe668342b87e0874182e0ffa9 (diff)
downloadexternal_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.zip
external_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.tar.gz
external_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.tar.bz2
Merge WebKit at r84325: Initial merge by git.
Change-Id: Ic1a909300ecc0a13ddc6b4e784371d2ac6e3d59b
Diffstat (limited to 'Source/WebCore/webaudio/AudioDestinationNode.h')
-rw-r--r--Source/WebCore/webaudio/AudioDestinationNode.h23
1 files changed, 7 insertions, 16 deletions
diff --git a/Source/WebCore/webaudio/AudioDestinationNode.h b/Source/WebCore/webaudio/AudioDestinationNode.h
index 4c21bb8..5913205 100644
--- a/Source/WebCore/webaudio/AudioDestinationNode.h
+++ b/Source/WebCore/webaudio/AudioDestinationNode.h
@@ -25,11 +25,9 @@
#ifndef AudioDestinationNode_h
#define AudioDestinationNode_h
-#include "AudioDestination.h"
+#include "AudioBuffer.h"
#include "AudioNode.h"
#include "AudioSourceProvider.h"
-#include <wtf/OwnPtr.h>
-#include <wtf/PassRefPtr.h>
namespace WebCore {
@@ -38,32 +36,25 @@ class AudioContext;
class AudioDestinationNode : public AudioNode, public AudioSourceProvider {
public:
- static PassRefPtr<AudioDestinationNode> create(AudioContext* context)
- {
- return adoptRef(new AudioDestinationNode(context));
- }
-
+ AudioDestinationNode(AudioContext*, double sampleRate);
virtual ~AudioDestinationNode();
// AudioNode
virtual void process(size_t) { }; // we're pulled by hardware so this is never called
virtual void reset() { m_currentTime = 0.0; };
- virtual void initialize();
- virtual void uninitialize();
// The audio hardware calls here periodically to gets its input stream.
virtual void provideInput(AudioBus*, size_t numberOfFrames);
double currentTime() { return m_currentTime; }
- double sampleRate() const { return m_destination->sampleRate(); }
+ virtual double sampleRate() const = 0;
- unsigned numberOfChannels() const { return 2; } // FIXME: update when multi-channel (more than stereo) is supported
-
-private:
- AudioDestinationNode(AudioContext*);
+ virtual unsigned numberOfChannels() const { return 2; } // FIXME: update when multi-channel (more than stereo) is supported
- OwnPtr<AudioDestination> m_destination;
+ virtual void startRendering() = 0;
+
+protected:
double m_currentTime;
};