Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/AudioBasicInspectorNode.cpp

Issue 2666063003: Continue to process AnalyserNode if inputs are silent. (Closed)
Patch Set: Adjust comment per review. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012, Intel Corporation. All rights reserved. 2 * Copyright (C) 2012, Intel Corporation. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 } 109 }
110 } else { 110 } else {
111 unsigned numberOfInputConnections = input(0).numberOfRenderingConnections(); 111 unsigned numberOfInputConnections = input(0).numberOfRenderingConnections();
112 if (numberOfInputConnections && !m_needAutomaticPull) { 112 if (numberOfInputConnections && !m_needAutomaticPull) {
113 // When an AudioBasicInspectorNode is not connected to any downstream node 113 // When an AudioBasicInspectorNode is not connected to any downstream node
114 // while still connected from upstream node(s), add it to the context's 114 // while still connected from upstream node(s), add it to the context's
115 // automatic pull list. 115 // automatic pull list.
116 context()->deferredTaskHandler().addAutomaticPullNode(this); 116 context()->deferredTaskHandler().addAutomaticPullNode(this);
117 m_needAutomaticPull = true; 117 m_needAutomaticPull = true;
118 } else if (!numberOfInputConnections && m_needAutomaticPull) { 118 } else if (!numberOfInputConnections && m_needAutomaticPull) {
119 // The AudioBasicInspectorNode is connected to nothing, remove it from the 119 // The AudioBasicInspectorNode is connected to nothing and is
120 // context's automatic pull list. 120 // not an AnalyserNode, remove it from the context's automatic
121 // pull list. AnalyserNode's need to be pulled even with no
122 // inputs so that the internal state gets updated to hold the
123 // right time and FFT data.
121 context()->deferredTaskHandler().removeAutomaticPullNode(this); 124 context()->deferredTaskHandler().removeAutomaticPullNode(this);
122 m_needAutomaticPull = false; 125 m_needAutomaticPull = false;
123 } 126 }
124 } 127 }
125 } 128 }
126 129
127 } // namespace blink 130 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698