Title: [148332] branches/safari-536.30-branch/Source/WebCore
- Revision
- 148332
- Author
- roger_f...@apple.com
- Date
- 2013-04-12 18:44:16 -0700 (Fri, 12 Apr 2013)
Log Message
Merged r143565, <rdar://problem/13334867>
Modified Paths
Diff
Modified: branches/safari-536.30-branch/Source/WebCore/ChangeLog (148331 => 148332)
--- branches/safari-536.30-branch/Source/WebCore/ChangeLog 2013-04-13 01:37:57 UTC (rev 148331)
+++ branches/safari-536.30-branch/Source/WebCore/ChangeLog 2013-04-13 01:44:16 UTC (rev 148332)
@@ -1,3 +1,25 @@
+2013-04-12 Roger Fong <roger_f...@apple.com>
+
+ Merge r143565.
+
+ 2013-02-20 Wei James <james....@intel.com>
+
+ ChannelMergerNode may need check for deferred updating of output channels
+ https://bugs.webkit.org/show_bug.cgi?id=108863
+
+ There can in rare cases be a slight delay before the output bus is updated
+ to the new number of channels because of tryLocks() in the context's
+ updating system. So need to check the channel number before processing.
+
+ Reviewed by Chris Rogers.
+
+ * Modules/webaudio/ChannelMergerNode.cpp:
+ (WebCore::ChannelMergerNode::ChannelMergerNode):
+ (WebCore::ChannelMergerNode::process):
+ (WebCore::ChannelMergerNode::checkNumberOfChannelsForInput):
+ * Modules/webaudio/ChannelMergerNode.h:
+ (ChannelMergerNode):
+
2013-04-12 Tim Horton <timothy_hor...@apple.com>
Merge r132856
Modified: branches/safari-536.30-branch/Source/WebCore/Modules/webaudio/AudioChannelMerger.cpp (148331 => 148332)
--- branches/safari-536.30-branch/Source/WebCore/Modules/webaudio/AudioChannelMerger.cpp 2013-04-13 01:37:57 UTC (rev 148331)
+++ branches/safari-536.30-branch/Source/WebCore/Modules/webaudio/AudioChannelMerger.cpp 2013-04-13 01:44:16 UTC (rev 148332)
@@ -36,6 +36,8 @@
#include "AudioNodeInput.h"
#include "AudioNodeOutput.h"
+const unsigned DefaultNumberOfOutputChannels = 1;
+
namespace WebCore {
PassRefPtr<AudioChannelMerger> AudioChannelMerger::create(AudioContext* context, float sampleRate, unsigned numberOfInputs)
@@ -66,6 +68,12 @@
ASSERT(output);
ASSERT_UNUSED(framesToProcess, framesToProcess == output->bus()->length());
+ // Output bus not updated yet, so just output silence.
+ if (m_desiredNumberOfOutputChannels != output->numberOfChannels()) {
+ output->bus()->zero();
+ return;
+ }
+
// Merge all the channels from all the inputs into one output.
unsigned outputChannelIndex = 0;
for (unsigned i = 0; i < numberOfInputs(); ++i) {
@@ -109,7 +117,11 @@
AudioNodeOutput* output = this->output(0);
ASSERT(output);
output->setNumberOfChannels(numberOfOutputChannels);
-
+ // There can in rare cases be a slight delay before the output bus is updated to the new number of
+ // channels because of tryLocks() in the context's updating system. So record the new number of
+ // output channels here.
+ m_desiredNumberOfOutputChannels = numberOfOutputChannels;
+
AudioNode::checkNumberOfChannelsForInput(input);
}
Modified: branches/safari-536.30-branch/Source/WebCore/Modules/webaudio/AudioChannelMerger.h (148331 => 148332)
--- branches/safari-536.30-branch/Source/WebCore/Modules/webaudio/AudioChannelMerger.h 2013-04-13 01:37:57 UTC (rev 148331)
+++ branches/safari-536.30-branch/Source/WebCore/Modules/webaudio/AudioChannelMerger.h 2013-04-13 01:44:16 UTC (rev 148332)
@@ -48,6 +48,8 @@
virtual void checkNumberOfChannelsForInput(AudioNodeInput*);
private:
+ unsigned m_desiredNumberOfOutputChannels;
+
virtual double tailTime() const OVERRIDE { return 0; }
virtual double latencyTime() const OVERRIDE { return 0; }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes