Changeset 86722 in webkit


Ignore:
Timestamp:
May 17, 2011 5:12:46 PM (13 years ago)
Author:
crogers@google.com
Message:

2011-05-17 Chris Rogers <crogers@google.com>

Reviewed by Kenneth Russell.

Make sure that AudioNode gets re-enabled after having been disconnected and re-connected.
https://bugs.webkit.org/show_bug.cgi?id=60995

No new tests since audio API is not yet implemented.

  • webaudio/AudioNode.cpp: (WebCore::AudioNode::ref):
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r86720 r86722  
     12011-05-17  Chris Rogers  <crogers@google.com>
     2
     3        Reviewed by Kenneth Russell.
     4
     5        Make sure that AudioNode gets re-enabled after having been disconnected and re-connected.
     6        https://bugs.webkit.org/show_bug.cgi?id=60995
     7
     8        No new tests since audio API is not yet implemented.
     9
     10        * webaudio/AudioNode.cpp:
     11        (WebCore::AudioNode::ref):
     12
    1132011-05-17  Brady Eidson  <beidson@apple.com>
    214
  • trunk/Source/WebCore/webaudio/AudioNode.cpp

    r70604 r86722  
    192192#endif
    193193
    194     if (m_connectionRefCount == 1 && refType == RefTypeConnection) {
    195         // FIXME: implement wake-up - this is an advanced feature and is not necessary in a simple implementation.
    196         // We should not be "actively" connected to anything, but now we're "waking up"
    197         // For example, a note which has finished playing, but is now being played again.
    198         // Note that if this is considered a worthwhile feature to add, then an evaluation of the locking considerations must be made.
     194    // See the disabling code in finishDeref() below. This handles the case where a node
     195    // is being re-connected after being used at least once and disconnected.
     196    // In this case, we need to re-enable.
     197    if (m_isDisabled && m_connectionRefCount > 0 && refType == RefTypeConnection) {
     198        ASSERT(isMainThread());
     199        AudioContext::AutoLocker locker(context());
     200
     201        m_isDisabled = false;
     202        for (unsigned i = 0; i < m_outputs.size(); ++i)
     203            output(i)->enable();
    199204    }
    200205}
Note: See TracChangeset for help on using the changeset viewer.