Changeset 71200 in webkit
- Timestamp:
- Nov 2, 2010 6:55:55 PM (13 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r71198 r71200 1 2010-11-02 Chris Rogers <crogers@google.com> 2 3 Reviewed by Kenneth Russell. 4 5 Simple followup changes to files affected by AudioNodeInput thread safety 6 https://bugs.webkit.org/show_bug.cgi?id=48661 7 8 No new tests since audio API is not yet implemented. 9 10 * webaudio/AudioBasicProcessorNode.cpp: 11 (WebCore::AudioBasicProcessorNode::checkNumberOfChannelsForInput): 12 * webaudio/AudioChannelSplitter.cpp: 13 (WebCore::AudioChannelSplitter::process): 14 * webaudio/AudioDestinationNode.cpp: 15 (WebCore::AudioDestinationNode::initialize): 16 (WebCore::AudioDestinationNode::uninitialize): 17 (WebCore::AudioDestinationNode::provideInput): 18 * webaudio/AudioGainNode.cpp: 19 (WebCore::AudioGainNode::checkNumberOfChannelsForInput): 20 * webaudio/AudioPannerNode.cpp: 21 (WebCore::AudioPannerNode::notifyAudioSourcesConnectedToNode): 22 1 23 2010-11-02 Chris Guillory <chris.guillory@google.com> 2 24 -
trunk/WebCore/webaudio/AudioBasicProcessorNode.cpp
r69131 r71200 30 30 31 31 #include "AudioBus.h" 32 #include "AudioContext.h" 32 33 #include "AudioNodeInput.h" 33 34 #include "AudioNodeOutput.h" … … 110 111 void AudioBasicProcessorNode::checkNumberOfChannelsForInput(AudioNodeInput* input) 111 112 { 112 ASSERT( isMainThread());113 ASSERT(context()->isAudioThread() && context()->isGraphOwner()); 113 114 114 115 ASSERT(input == this->input(0)); … … 129 130 } 130 131 131 // This will propagate the channel count to any nodes connected further down the chain... 132 output(0)->setNumberOfChannels(numberOfChannels); 132 if (!isInitialized()) { 133 // This will propagate the channel count to any nodes connected further down the chain... 134 output(0)->setNumberOfChannels(numberOfChannels); 133 135 134 // Re-initialize the processor with the new channel count. 135 processor()->setNumberOfChannels(numberOfChannels); 136 initialize(); 136 // Re-initialize the processor with the new channel count. 137 processor()->setNumberOfChannels(numberOfChannels); 138 initialize(); 139 } 137 140 } 138 141 -
trunk/WebCore/webaudio/AudioChannelSplitter.cpp
r71149 r71200 69 69 // It would be nice to avoid the copy and simply pass along pointers, but this becomes extremely difficult with fanout and fanin. 70 70 destination->channel(0)->copyFrom(source->channel(i)); 71 } else if (output(i)-> fanOutCount() > 0) {71 } else if (output(i)->renderingFanOutCount() > 0) { 72 72 // Only bother zeroing out the destination if it's connected to anything 73 73 destination->zero(); -
trunk/WebCore/webaudio/AudioDestinationNode.cpp
r71149 r71200 66 66 m_destination->start(); 67 67 68 m_isInitialized = true;68 AudioNode::initialize(); 69 69 } 70 70 … … 76 76 m_destination->stop(); 77 77 78 m_isInitialized = false;78 AudioNode::uninitialize(); 79 79 } 80 80 … … 88 88 return; 89 89 } 90 91 // Let the context take care of any business at the start of each render quantum. 92 context()->handlePreRenderTasks(); 90 93 91 94 // This will cause the node(s) connected to us to process, which in turn will pull on their input(s), -
trunk/WebCore/webaudio/AudioGainNode.cpp
r71149 r71200 102 102 } 103 103 104 // This will propagate the channel count to any nodes connected further downstream in the graph. 105 output(0)->setNumberOfChannels(numberOfChannels); 106 107 initialize(); 104 if (!isInitialized()) { 105 // This will propagate the channel count to any nodes connected further downstream in the graph. 106 output(0)->setNumberOfChannels(numberOfChannels); 107 initialize(); 108 } 108 109 } 109 110 -
trunk/WebCore/webaudio/AudioPannerNode.cpp
r71149 r71200 304 304 305 305 // For each input, go through all of its connections, looking for AudioBufferSourceNodes. 306 for (unsigned j = 0; j < input->numberOf Connections(); ++j) {307 AudioNodeOutput* connectedOutput = input-> output(j);306 for (unsigned j = 0; j < input->numberOfRenderingConnections(); ++j) { 307 AudioNodeOutput* connectedOutput = input->renderingOutput(j); 308 308 AudioNode* connectedNode = connectedOutput->node(); 309 309 notifyAudioSourcesConnectedToNode(connectedNode); // recurse
Note: See TracChangeset
for help on using the changeset viewer.