[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
crogers at google.com
crogers at google.com
Wed Dec 22 13:49:26 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit b73519d412f434ad46e00695c3bacb2fe2c559cb
Author: crogers at google.com <crogers at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Sep 27 23:00:58 2010 +0000
2010-09-27 Chris Rogers <crogers at google.com>
Reviewed by Kenneth Russell.
Add AudioNode files
https://bugs.webkit.org/show_bug.cgi?id=45571
No new tests since audio API is not yet implemented.
* webaudio/AudioNode.cpp: Added.
(WebCore::AudioNode::AudioNode):
(WebCore::AudioNode::~AudioNode):
(WebCore::AudioNode::setType):
(WebCore::AudioNode::lazyInitialize):
(WebCore::AudioNode::addInput):
(WebCore::AudioNode::addOutput):
(WebCore::AudioNode::input):
(WebCore::AudioNode::output):
(WebCore::AudioNode::connect):
(WebCore::AudioNode::disconnect):
(WebCore::AudioNode::processIfNecessary):
(WebCore::AudioNode::pullInputs):
(WebCore::AudioNode::ref):
(WebCore::AudioNode::deref):
(WebCore::AudioNode::finishDeref):
(WebCore::AudioNode::printNodeCounts):
* webaudio/AudioNode.h: Added.
(WebCore::AudioNode::context):
(WebCore::AudioNode::type):
(WebCore::AudioNode::isInitialized):
(WebCore::AudioNode::numberOfInputs):
(WebCore::AudioNode::numberOfOutputs):
(WebCore::AudioNode::sampleRate):
(WebCore::AudioNode::checkNumberOfChannelsForInput):
* webaudio/AudioNode.idl: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68438 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 1c318a1..0277ec5 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,39 @@
+2010-09-27 Chris Rogers <crogers at google.com>
+
+ Reviewed by Kenneth Russell.
+
+ Add AudioNode files
+ https://bugs.webkit.org/show_bug.cgi?id=45571
+
+ No new tests since audio API is not yet implemented.
+
+ * webaudio/AudioNode.cpp: Added.
+ (WebCore::AudioNode::AudioNode):
+ (WebCore::AudioNode::~AudioNode):
+ (WebCore::AudioNode::setType):
+ (WebCore::AudioNode::lazyInitialize):
+ (WebCore::AudioNode::addInput):
+ (WebCore::AudioNode::addOutput):
+ (WebCore::AudioNode::input):
+ (WebCore::AudioNode::output):
+ (WebCore::AudioNode::connect):
+ (WebCore::AudioNode::disconnect):
+ (WebCore::AudioNode::processIfNecessary):
+ (WebCore::AudioNode::pullInputs):
+ (WebCore::AudioNode::ref):
+ (WebCore::AudioNode::deref):
+ (WebCore::AudioNode::finishDeref):
+ (WebCore::AudioNode::printNodeCounts):
+ * webaudio/AudioNode.h: Added.
+ (WebCore::AudioNode::context):
+ (WebCore::AudioNode::type):
+ (WebCore::AudioNode::isInitialized):
+ (WebCore::AudioNode::numberOfInputs):
+ (WebCore::AudioNode::numberOfOutputs):
+ (WebCore::AudioNode::sampleRate):
+ (WebCore::AudioNode::checkNumberOfChannelsForInput):
+ * webaudio/AudioNode.idl: Added.
+
2010-09-27 David Hyatt <hyatt at apple.com>
Reviewed by Sam Weinig.
diff --git a/WebCore/webaudio/AudioNode.cpp b/WebCore/webaudio/AudioNode.cpp
new file mode 100644
index 0000000..497ac95
--- /dev/null
+++ b/WebCore/webaudio/AudioNode.cpp
@@ -0,0 +1,311 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#if ENABLE(WEB_AUDIO)
+
+#include "AudioNode.h"
+
+#include "AudioContext.h"
+#include "AudioNodeInput.h"
+#include "AudioNodeOutput.h"
+#include <wtf/Atomics.h>
+
+namespace WebCore {
+
+AudioNode::AudioNode(AudioContext* context, double sampleRate)
+ : m_isInitialized(false)
+ , m_type(NodeTypeUnknown)
+ , m_context(context)
+ , m_sampleRate(sampleRate)
+ , m_lastProcessingTime(-1.0)
+ , m_normalRefCount(1) // start out with normal refCount == 1 (like WTF::RefCounted class)
+ , m_connectionRefCount(0)
+ , m_disabledRefCount(0)
+ , m_isMarkedForDeletion(false)
+ , m_isDisabled(false)
+{
+#if DEBUG_AUDIONODE_REFERENCES
+ if (!s_isNodeCountInitialized) {
+ s_isNodeCountInitialized = true;
+ atexit(AudioNode::printNodeCounts);
+ }
+#endif
+}
+
+AudioNode::~AudioNode()
+{
+#if DEBUG_AUDIONODE_REFERENCES
+ --s_nodeCount[type()];
+ printf("%p: %d: AudioNode::~AudioNode() %d %d %d\n", this, type(), m_normalRefCount, m_connectionRefCount, m_disabledRefCount);
+#endif
+}
+
+void AudioNode::setType(NodeType type)
+{
+ m_type = type;
+
+#if DEBUG_AUDIONODE_REFERENCES
+ ++s_nodeCount[type];
+#endif
+}
+
+void AudioNode::lazyInitialize()
+{
+ if (!isInitialized())
+ initialize();
+}
+
+void AudioNode::addInput(PassOwnPtr<AudioNodeInput> input)
+{
+ m_inputs.append(input);
+}
+
+void AudioNode::addOutput(PassOwnPtr<AudioNodeOutput> output)
+{
+ m_outputs.append(output);
+}
+
+AudioNodeInput* AudioNode::input(unsigned i)
+{
+ return m_inputs[i].get();
+}
+
+AudioNodeOutput* AudioNode::output(unsigned i)
+{
+ return m_outputs[i].get();
+}
+
+bool AudioNode::connect(AudioNode* destination, unsigned outputIndex, unsigned inputIndex)
+{
+ ASSERT(isMainThread());
+ AudioContext::AutoLocker locker(context());
+
+ // Sanity check input and output indices.
+ if (outputIndex >= numberOfOutputs())
+ return false;
+ if (destination && inputIndex >= destination->numberOfInputs())
+ return false;
+
+ AudioNodeOutput* output = this->output(outputIndex);
+ if (!destination) {
+ // Disconnect output from any inputs it may be currently connected to.
+ output->disconnectAllInputs();
+ return true;
+ }
+
+ AudioNodeInput* input = destination->input(inputIndex);
+ input->connect(output);
+
+ // Let context know that a connection has been made.
+ context()->incrementConnectionCount();
+
+ return true;
+}
+
+bool AudioNode::disconnect(unsigned outputIndex)
+{
+ ASSERT(isMainThread());
+ AudioContext::AutoLocker locker(context());
+
+ return connect(0, outputIndex);
+}
+
+void AudioNode::processIfNecessary(size_t framesToProcess)
+{
+ ASSERT(context()->isAudioThread());
+
+ if (!isInitialized())
+ return;
+
+ // Ensure that we only process once per rendering quantum.
+ // This handles the "fanout" problem where an output is connected to multiple inputs.
+ // The first time we're called during this time slice we process, but after that we don't want to re-process,
+ // instead our output(s) will already have the results cached in their bus;
+ double currentTime = context()->currentTime();
+ if (m_lastProcessingTime != currentTime) {
+ m_lastProcessingTime = currentTime; // important to first update this time because of feedback loops in the rendering graph
+ pullInputs(framesToProcess);
+ process(framesToProcess);
+ }
+}
+
+void AudioNode::pullInputs(size_t framesToProcess)
+{
+ ASSERT(context()->isAudioThread());
+
+ // Process all of the AudioNodes connected to our inputs.
+ for (unsigned i = 0; i < m_inputs.size(); ++i)
+ input(i)->pull(0, framesToProcess);
+}
+
+void AudioNode::ref(RefType refType)
+{
+ switch (refType) {
+ case RefTypeNormal:
+ atomicIncrement(&m_normalRefCount);
+ break;
+ case RefTypeConnection:
+ atomicIncrement(&m_connectionRefCount);
+ break;
+ case RefTypeDisabled:
+ atomicIncrement(&m_disabledRefCount);
+ break;
+ default:
+ ASSERT_NOT_REACHED();
+ }
+
+#if DEBUG_AUDIONODE_REFERENCES
+ printf("%p: %d: AudioNode::ref(%d) %d %d %d\n", this, type(), refType, m_normalRefCount, m_connectionRefCount, m_disabledRefCount);
+#endif
+
+ if (m_connectionRefCount == 1 && refType == RefTypeConnection) {
+ // FIXME: implement wake-up - this is an advanced feature and is not necessary in a simple implementation.
+ // We should not be "actively" connected to anything, but now we're "waking up"
+ // For example, a note which has finished playing, but is now being played again.
+ // Note that if this is considered a worthwhile feature to add, then an evaluation of the locking considerations must be made.
+ }
+}
+
+void AudioNode::deref(RefType refType)
+{
+ // The actually work for deref happens completely within the audio context's graph lock.
+ // In the case of the audio thread, we must use a tryLock to avoid glitches.
+ bool hasLock = false;
+ bool mustReleaseLock = false;
+
+ if (context()->isAudioThread()) {
+ // Real-time audio thread must not contend lock (to avoid glitches).
+ hasLock = context()->tryLock(mustReleaseLock);
+ } else {
+ context()->lock(mustReleaseLock);
+ hasLock = true;
+ }
+
+ if (hasLock) {
+ // This is where the real deref work happens.
+ finishDeref(refType);
+
+ if (mustReleaseLock)
+ context()->unlock();
+ } else {
+ // We were unable to get the lock, so put this in a list to finish up later.
+ ASSERT(context()->isAudioThread());
+ context()->addDeferredFinishDeref(this, refType);
+ }
+
+ // Once AudioContext::uninitialize() is called there's no more chances for deleteMarkedNodes() to get called, so we call here.
+ // We can't call in AudioContext::~AudioContext() since it will never be called as long as any AudioNode is alive
+ // because AudioNodes keep a reference to the context.
+ if (context()->isAudioThreadFinished())
+ context()->deleteMarkedNodes();
+}
+
+void AudioNode::finishDeref(RefType refType)
+{
+ ASSERT(context()->isGraphOwner());
+
+ switch (refType) {
+ case RefTypeNormal:
+ ASSERT(m_normalRefCount > 0);
+ atomicDecrement(&m_normalRefCount);
+ break;
+ case RefTypeConnection:
+ ASSERT(m_connectionRefCount > 0);
+ atomicDecrement(&m_connectionRefCount);
+ break;
+ case RefTypeDisabled:
+ ASSERT(m_disabledRefCount > 0);
+ atomicDecrement(&m_disabledRefCount);
+ break;
+ default:
+ ASSERT_NOT_REACHED();
+ }
+
+#if DEBUG_AUDIONODE_REFERENCES
+ printf("%p: %d: AudioNode::deref(%d) %d %d %d\n", this, type(), refType, m_normalRefCount, m_connectionRefCount, m_disabledRefCount);
+#endif
+
+ if (!m_connectionRefCount) {
+ if (!m_normalRefCount && !m_disabledRefCount) {
+ if (!m_isMarkedForDeletion) {
+ // All references are gone - we need to go away.
+ for (unsigned i = 0; i < m_outputs.size(); ++i)
+ output(i)->disconnectAllInputs(); // this will deref() nodes we're connected to...
+
+ // Mark for deletion at end of each render quantum or when context shuts down.
+ context()->markForDeletion(this);
+ m_isMarkedForDeletion = true;
+ }
+ } else if (refType == RefTypeConnection) {
+ if (!m_isDisabled) {
+ // Still may have JavaScript references, but no more "active" connection references, so put all of our outputs in a "dormant" disabled state.
+ // Garbage collection may take a very long time after this time, so the "dormant" disabled nodes should not bog down the rendering...
+
+ // As far as JavaScript is concerned, our outputs must still appear to be connected.
+ // But internally our outputs should be disabled from the inputs they're connected to.
+ // disable() can recursively deref connections (and call disable()) down a whole chain of connected nodes.
+
+ // FIXME: we special case the convolver and delay since they have a significant tail-time and shouldn't be disconnected simply
+ // because they no longer have any input connections. This needs to be handled more generally where AudioNodes have
+ // a tailTime attribute. Then the AudioNode only needs to remain "active" for tailTime seconds after there are no
+ // longer any active connections.
+ if (type() != NodeTypeConvolver && type() != NodeTypeDelay) {
+ m_isDisabled = true;
+ for (unsigned i = 0; i < m_outputs.size(); ++i)
+ output(i)->disable();
+ }
+ }
+ }
+ }
+}
+
+#if DEBUG_AUDIONODE_REFERENCES
+
+bool AudioNode::s_isNodeCountInitialized = false;
+int AudioNode::s_nodeCount[NodeTypeEnd];
+
+void AudioNode::printNodeCounts()
+{
+ printf("\n\n");
+ printf("===========================\n");
+ printf("AudioNode: reference counts\n");
+ printf("===========================\n");
+
+ for (unsigned i = 0; i < NodeTypeEnd; ++i)
+ printf("%d: %d\n", i, s_nodeCount[i]);
+
+ printf("===========================\n\n\n");
+}
+
+#endif // DEBUG_AUDIONODE_REFERENCES
+
+} // namespace WebCore
+
+#endif // ENABLE(WEB_AUDIO)
diff --git a/WebCore/webaudio/AudioNode.h b/WebCore/webaudio/AudioNode.h
new file mode 100644
index 0000000..b697457
--- /dev/null
+++ b/WebCore/webaudio/AudioNode.h
@@ -0,0 +1,174 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef AudioNode_h
+#define AudioNode_h
+
+#include <wtf/OwnPtr.h>
+#include <wtf/PassOwnPtr.h>
+#include <wtf/RefPtr.h>
+#include <wtf/Vector.h>
+
+#define DEBUG_AUDIONODE_REFERENCES 0
+
+namespace WebCore {
+
+class AudioContext;
+class AudioNodeInput;
+class AudioNodeOutput;
+
+// An AudioNode is the basic building block for handling audio within an AudioContext.
+// It may be an audio source, an intermediate processing module, or an audio destination.
+// Each AudioNode can have inputs and/or outputs. An AudioSourceNode has no inputs and a single output.
+// An AudioDestinationNode has one input and no outputs and represents the final destination to the audio hardware.
+// Most processing nodes such as filters will have one input and one output, although multiple inputs and outputs are possible.
+
+class AudioNode {
+public:
+ enum { ProcessingSizeInFrames = 128 };
+
+ AudioNode(AudioContext*, double sampleRate);
+ virtual ~AudioNode();
+
+ AudioContext* context() { return m_context.get(); }
+
+ enum NodeType {
+ NodeTypeUnknown,
+ NodeTypeDestination,
+ NodeTypeAudioBufferSource,
+ NodeTypeJavaScript,
+ NodeTypeLowPass2Filter,
+ NodeTypeHighPass2Filter,
+ NodeTypePanner,
+ NodeTypeConvolver,
+ NodeTypeDelay,
+ NodeTypeGain,
+ NodeTypeChannelSplitter,
+ NodeTypeChannelMerger,
+ NodeTypeAnalyser,
+ NodeTypeEnd
+ };
+
+ NodeType type() const { return m_type; }
+ void setType(NodeType);
+
+ // We handle our own ref-counting because of the threading issues and subtle nature of
+ // how AudioNodes can continue processing (playing one-shot sound) after there are no more
+ // JavaScript references to the object.
+ enum RefType { RefTypeNormal, RefTypeConnection, RefTypeDisabled };
+
+ // Can be called from main thread or context's audio thread.
+ void ref(RefType refType = RefTypeNormal);
+ void deref(RefType refType = RefTypeNormal);
+
+ // Can be called from main thread or context's audio thread. It must be called while the context's graph lock is held.
+ void finishDeref(RefType refType);
+
+ // The AudioNodeInput(s) (if any) will already have their input data available when process() is called.
+ // Subclasses will take this input data and put the results in the AudioBus(s) of its AudioNodeOutput(s) (if any).
+ // Called from context's audio thread.
+ virtual void process(size_t framesToProcess) = 0;
+
+ // Resets DSP processing state (clears delay lines, filter memory, etc.)
+ // Called from context's audio thread.
+ virtual void reset() = 0;
+
+ // No significant resources should be allocated until initialize() is called.
+ // Processing may not occur until a node is initialized.
+ virtual void initialize() = 0;
+ virtual void uninitialize() = 0;
+
+ bool isInitialized() const { return m_isInitialized; }
+ void lazyInitialize();
+
+ unsigned numberOfInputs() const { return m_inputs.size(); }
+ unsigned numberOfOutputs() const { return m_outputs.size(); }
+
+ AudioNodeInput* input(unsigned);
+ AudioNodeOutput* output(unsigned);
+
+ // connect() / disconnect() return true on success.
+ // Called from main thread by corresponding JavaScript methods.
+ bool connect(AudioNode* destination, unsigned outputIndex = 0, unsigned inputIndex = 0);
+ bool disconnect(unsigned outputIndex = 0);
+
+ double sampleRate() const { return m_sampleRate; }
+
+ // processIfNecessary() is called by our output(s) when the rendering graph needs this AudioNode to process.
+ // This method ensures that the AudioNode will only process once per rendering time quantum even if it's called repeatedly.
+ // This handles the case of "fanout" where an output is connected to multiple AudioNode inputs.
+ // Called from context's audio thread.
+ void processIfNecessary(size_t framesToProcess);
+
+ // Called when a new connection has been made to one of our inputs or the connection number of channels has changed.
+ // This potentially gives us enough information to perform a lazy initialization or, if necessary, a re-initialization.
+ // Called from main thread.
+ virtual void checkNumberOfChannelsForInput(AudioNodeInput*) { }
+
+#if DEBUG_AUDIONODE_REFERENCES
+ static void printNodeCounts();
+#endif
+
+protected:
+ // Inputs and outputs must be created before the AudioNode is initialized.
+ void addInput(PassOwnPtr<AudioNodeInput>);
+ void addOutput(PassOwnPtr<AudioNodeOutput>);
+
+ // Called by processIfNecessary() to cause all parts of the rendering graph connected to us to process.
+ // Each rendering quantum, the audio data for each of the AudioNode's inputs will be available after this method is called.
+ // Called from context's audio thread.
+ virtual void pullInputs(size_t framesToProcess);
+
+ bool m_isInitialized;
+
+private:
+ NodeType m_type;
+ RefPtr<AudioContext> m_context;
+ double m_sampleRate;
+ Vector<OwnPtr<AudioNodeInput> > m_inputs;
+ Vector<OwnPtr<AudioNodeOutput> > m_outputs;
+
+ double m_lastProcessingTime;
+
+ // Ref-counting
+ volatile int m_normalRefCount;
+ volatile int m_connectionRefCount;
+ volatile int m_disabledRefCount;
+
+ bool m_isMarkedForDeletion;
+ bool m_isDisabled;
+
+#if DEBUG_AUDIONODE_REFERENCES
+ static bool s_isNodeCountInitialized;
+ static int s_nodeCount[NodeTypeEnd];
+#endif
+};
+
+} // namespace WebCore
+
+#endif // AudioNode_h
diff --git a/WebCore/webaudio/AudioNode.idl b/WebCore/webaudio/AudioNode.idl
new file mode 100644
index 0000000..5ed47cb
--- /dev/null
+++ b/WebCore/webaudio/AudioNode.idl
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+module audio {
+ interface [
+ Conditional=WEB_AUDIO
+ ] AudioNode {
+ readonly attribute AudioContext context;
+ readonly attribute unsigned long numberOfInputs;
+ readonly attribute unsigned long numberOfOutputs;
+
+ [Custom] void connect(in AudioNode destination, in unsigned long output, in unsigned long input);
+ [Custom] void disconnect(in unsigned long output);
+ };
+}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list