[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 15:25:16 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 0155556f35f4dfd95250eafed16d7258d4c1f265
Author: crogers at google.com <crogers at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Nov 3 01:55:55 2010 +0000
2010-11-02 Chris Rogers <crogers at google.com>
Reviewed by Kenneth Russell.
Simple followup changes to files affected by AudioNodeInput thread safety
https://bugs.webkit.org/show_bug.cgi?id=48661
No new tests since audio API is not yet implemented.
* webaudio/AudioBasicProcessorNode.cpp:
(WebCore::AudioBasicProcessorNode::checkNumberOfChannelsForInput):
* webaudio/AudioChannelSplitter.cpp:
(WebCore::AudioChannelSplitter::process):
* webaudio/AudioDestinationNode.cpp:
(WebCore::AudioDestinationNode::initialize):
(WebCore::AudioDestinationNode::uninitialize):
(WebCore::AudioDestinationNode::provideInput):
* webaudio/AudioGainNode.cpp:
(WebCore::AudioGainNode::checkNumberOfChannelsForInput):
* webaudio/AudioPannerNode.cpp:
(WebCore::AudioPannerNode::notifyAudioSourcesConnectedToNode):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71200 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 0c9ff0b..d7557c5 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,25 @@
+2010-11-02 Chris Rogers <crogers at google.com>
+
+ Reviewed by Kenneth Russell.
+
+ Simple followup changes to files affected by AudioNodeInput thread safety
+ https://bugs.webkit.org/show_bug.cgi?id=48661
+
+ No new tests since audio API is not yet implemented.
+
+ * webaudio/AudioBasicProcessorNode.cpp:
+ (WebCore::AudioBasicProcessorNode::checkNumberOfChannelsForInput):
+ * webaudio/AudioChannelSplitter.cpp:
+ (WebCore::AudioChannelSplitter::process):
+ * webaudio/AudioDestinationNode.cpp:
+ (WebCore::AudioDestinationNode::initialize):
+ (WebCore::AudioDestinationNode::uninitialize):
+ (WebCore::AudioDestinationNode::provideInput):
+ * webaudio/AudioGainNode.cpp:
+ (WebCore::AudioGainNode::checkNumberOfChannelsForInput):
+ * webaudio/AudioPannerNode.cpp:
+ (WebCore::AudioPannerNode::notifyAudioSourcesConnectedToNode):
+
2010-11-02 Chris Guillory <chris.guillory at google.com>
Reviewed by Chris Fleizach.
diff --git a/WebCore/webaudio/AudioBasicProcessorNode.cpp b/WebCore/webaudio/AudioBasicProcessorNode.cpp
index cadaa73..828062e 100644
--- a/WebCore/webaudio/AudioBasicProcessorNode.cpp
+++ b/WebCore/webaudio/AudioBasicProcessorNode.cpp
@@ -29,6 +29,7 @@
#include "AudioBasicProcessorNode.h"
#include "AudioBus.h"
+#include "AudioContext.h"
#include "AudioNodeInput.h"
#include "AudioNodeOutput.h"
#include "AudioProcessor.h"
@@ -109,7 +110,7 @@ void AudioBasicProcessorNode::reset()
// uninitialize and then re-initialize with the new channel count.
void AudioBasicProcessorNode::checkNumberOfChannelsForInput(AudioNodeInput* input)
{
- ASSERT(isMainThread());
+ ASSERT(context()->isAudioThread() && context()->isGraphOwner());
ASSERT(input == this->input(0));
if (input != this->input(0))
@@ -128,12 +129,14 @@ void AudioBasicProcessorNode::checkNumberOfChannelsForInput(AudioNodeInput* inpu
uninitialize();
}
- // This will propagate the channel count to any nodes connected further down the chain...
- output(0)->setNumberOfChannels(numberOfChannels);
+ if (!isInitialized()) {
+ // This will propagate the channel count to any nodes connected further down the chain...
+ output(0)->setNumberOfChannels(numberOfChannels);
- // Re-initialize the processor with the new channel count.
- processor()->setNumberOfChannels(numberOfChannels);
- initialize();
+ // Re-initialize the processor with the new channel count.
+ processor()->setNumberOfChannels(numberOfChannels);
+ initialize();
+ }
}
unsigned AudioBasicProcessorNode::numberOfChannels()
diff --git a/WebCore/webaudio/AudioChannelSplitter.cpp b/WebCore/webaudio/AudioChannelSplitter.cpp
index e30f90f..f4fa041 100644
--- a/WebCore/webaudio/AudioChannelSplitter.cpp
+++ b/WebCore/webaudio/AudioChannelSplitter.cpp
@@ -68,7 +68,7 @@ void AudioChannelSplitter::process(size_t framesToProcess)
// Split the channel out if it exists in the source.
// It would be nice to avoid the copy and simply pass along pointers, but this becomes extremely difficult with fanout and fanin.
destination->channel(0)->copyFrom(source->channel(i));
- } else if (output(i)->fanOutCount() > 0) {
+ } else if (output(i)->renderingFanOutCount() > 0) {
// Only bother zeroing out the destination if it's connected to anything
destination->zero();
}
diff --git a/WebCore/webaudio/AudioDestinationNode.cpp b/WebCore/webaudio/AudioDestinationNode.cpp
index caa8292..d2f4928 100644
--- a/WebCore/webaudio/AudioDestinationNode.cpp
+++ b/WebCore/webaudio/AudioDestinationNode.cpp
@@ -65,7 +65,7 @@ void AudioDestinationNode::initialize()
m_destination = AudioDestination::create(*this, hardwareSampleRate);
m_destination->start();
- m_isInitialized = true;
+ AudioNode::initialize();
}
void AudioDestinationNode::uninitialize()
@@ -75,7 +75,7 @@ void AudioDestinationNode::uninitialize()
m_destination->stop();
- m_isInitialized = false;
+ AudioNode::uninitialize();
}
// The audio hardware calls us back here to gets its input stream.
@@ -88,6 +88,9 @@ void AudioDestinationNode::provideInput(AudioBus* destinationBus, size_t numberO
return;
}
+ // Let the context take care of any business at the start of each render quantum.
+ context()->handlePreRenderTasks();
+
// This will cause the node(s) connected to us to process, which in turn will pull on their input(s),
// all the way backwards through the rendering graph.
AudioBus* renderedBus = input(0)->pull(destinationBus, numberOfFrames);
diff --git a/WebCore/webaudio/AudioGainNode.cpp b/WebCore/webaudio/AudioGainNode.cpp
index d6198a6..5b9af07 100644
--- a/WebCore/webaudio/AudioGainNode.cpp
+++ b/WebCore/webaudio/AudioGainNode.cpp
@@ -101,10 +101,11 @@ void AudioGainNode::checkNumberOfChannelsForInput(AudioNodeInput* input)
uninitialize();
}
- // This will propagate the channel count to any nodes connected further downstream in the graph.
- output(0)->setNumberOfChannels(numberOfChannels);
-
- initialize();
+ if (!isInitialized()) {
+ // This will propagate the channel count to any nodes connected further downstream in the graph.
+ output(0)->setNumberOfChannels(numberOfChannels);
+ initialize();
+ }
}
} // namespace WebCore
diff --git a/WebCore/webaudio/AudioPannerNode.cpp b/WebCore/webaudio/AudioPannerNode.cpp
index ab57042..4afca27 100644
--- a/WebCore/webaudio/AudioPannerNode.cpp
+++ b/WebCore/webaudio/AudioPannerNode.cpp
@@ -303,8 +303,8 @@ void AudioPannerNode::notifyAudioSourcesConnectedToNode(AudioNode* node)
AudioNodeInput* input = node->input(i);
// For each input, go through all of its connections, looking for AudioBufferSourceNodes.
- for (unsigned j = 0; j < input->numberOfConnections(); ++j) {
- AudioNodeOutput* connectedOutput = input->output(j);
+ for (unsigned j = 0; j < input->numberOfRenderingConnections(); ++j) {
+ AudioNodeOutput* connectedOutput = input->renderingOutput(j);
AudioNode* connectedNode = connectedOutput->node();
notifyAudioSourcesConnectedToNode(connectedNode); // recurse
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list