Title: [91801] trunk/Source/WebCore
- Revision
- 91801
- Author
- [email protected]
- Date
- 2011-07-26 17:15:37 -0700 (Tue, 26 Jul 2011)
Log Message
AudioContext is not correctly accounting for hardware resources
https://bugs.webkit.org/show_bug.cgi?id=65217
Reviewed by Kenneth Russell.
No new tests since audio API is not yet implemented.
* webaudio/AudioContext.cpp:
(WebCore::AudioContext::create):
(WebCore::AudioContext::AudioContext):
(WebCore::AudioContext::lazyInitialize):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (91800 => 91801)
--- trunk/Source/WebCore/ChangeLog 2011-07-27 00:14:34 UTC (rev 91800)
+++ trunk/Source/WebCore/ChangeLog 2011-07-27 00:15:37 UTC (rev 91801)
@@ -1,3 +1,17 @@
+2011-07-26 Chris Rogers <[email protected]>
+
+ AudioContext is not correctly accounting for hardware resources
+ https://bugs.webkit.org/show_bug.cgi?id=65217
+
+ Reviewed by Kenneth Russell.
+
+ No new tests since audio API is not yet implemented.
+
+ * webaudio/AudioContext.cpp:
+ (WebCore::AudioContext::create):
+ (WebCore::AudioContext::AudioContext):
+ (WebCore::AudioContext::lazyInitialize):
+
2011-07-26 Luke Macpherson <[email protected]>
Handle CSS Properties that can be either auto or a primitive value in CSSStyleApplyProperty
Modified: trunk/Source/WebCore/webaudio/AudioContext.cpp (91800 => 91801)
--- trunk/Source/WebCore/webaudio/AudioContext.cpp 2011-07-27 00:14:34 UTC (rev 91800)
+++ trunk/Source/WebCore/webaudio/AudioContext.cpp 2011-07-27 00:15:37 UTC (rev 91801)
@@ -93,8 +93,6 @@
ASSERT(isMainThread());
if (s_hardwareContextCount >= MaxHardwareContexts)
return 0;
-
- ++s_hardwareContextCount;
return adoptRef(new AudioContext(document));
}
@@ -135,10 +133,6 @@
// It's not that useful to have a callback function for this since the audio thread automatically starts rendering on the graph
// when this has finished (see AudioDestinationNode).
m_hrtfDatabaseLoader = HRTFDatabaseLoader::createAndLoadAsynchronouslyIfNecessary(sampleRate());
-
- // FIXME: for now default AudioContext does not need an explicit startRendering() call.
- // We may want to consider requiring it for symmetry with OfflineAudioContext
- m_destinationNode->startRendering();
}
// Constructor for offline (non-realtime) rendering.
@@ -194,9 +188,17 @@
ASSERT(!m_isAudioThreadFinished);
if (!m_isAudioThreadFinished) {
if (m_destinationNode.get()) {
- // This starts the audio thread. The destination node's provideInput() method will now be called repeatedly to render audio.
- // Each time provideInput() is called, a portion of the audio stream is rendered. Let's call this time period a "render quantum".
m_destinationNode->initialize();
+
+ if (!isOfflineContext()) {
+ // This starts the audio thread. The destination node's provideInput() method will now be called repeatedly to render audio.
+ // Each time provideInput() is called, a portion of the audio stream is rendered. Let's call this time period a "render quantum".
+ // NOTE: for now default AudioContext does not need an explicit startRendering() call from _javascript_.
+ // We may want to consider requiring it for symmetry with OfflineAudioContext.
+ m_destinationNode->startRendering();
+ ++s_hardwareContextCount;
+ }
+
}
m_isInitialized = true;
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes