void OfflineAudioContext::handlePostOfflineRenderTasks() { ASSERT(isAudioThread()); // OfflineGraphAutoLocker here locks the audio graph for the same reason // above in |handlePreOfflineRenderTasks|. OfflineGraphAutoLocker locker(this); deferredTaskHandler().breakConnections(); releaseFinishedSourceNodes(); deferredTaskHandler().handleDeferredTasks(); deferredTaskHandler().requestToDeleteHandlersOnMainThread(); }
void AbstractAudioContext::handlePostRenderTasks() { ASSERT(isAudioThread()); // Must use a tryLock() here too. Don't worry, the lock will very rarely be contended and this method is called frequently. // The worst that can happen is that there will be some nodes which will take slightly longer than usual to be deleted or removed // from the render graph (in which case they'll render silence). if (tryLock()) { // Take care of AudioNode tasks where the tryLock() failed previously. deferredTaskHandler().breakConnections(); // Dynamically clean up nodes which are no longer needed. releaseFinishedSourceNodes(); deferredTaskHandler().handleDeferredTasks(); deferredTaskHandler().requestToDeleteHandlersOnMainThread(); unlock(); } }