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

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

Issue 2429633003: Handle disabled outputs better when enabling. (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « third_party/WebKit/LayoutTests/webaudio/audionode-disconnect-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010, Google Inc. All rights reserved. 2 * Copyright (C) 2010, Google Inc. 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 m_disabledOutputs.add(&output); 87 m_disabledOutputs.add(&output);
88 m_outputs.remove(&output); 88 m_outputs.remove(&output);
89 changedOutputs(); 89 changedOutputs();
90 90
91 // Propagate disabled state to outputs. 91 // Propagate disabled state to outputs.
92 handler().disableOutputsIfNecessary(); 92 handler().disableOutputsIfNecessary();
93 } 93 }
94 94
95 void AudioNodeInput::enable(AudioNodeOutput& output) { 95 void AudioNodeInput::enable(AudioNodeOutput& output) {
96 ASSERT(deferredTaskHandler().isGraphOwner()); 96 ASSERT(deferredTaskHandler().isGraphOwner());
97 DCHECK(m_disabledOutputs.contains(&output));
98 97
99 // Move output from disabled list to active list. 98 // Move output from disabled list to active list.
100 m_outputs.add(&output); 99 m_outputs.add(&output);
101 m_disabledOutputs.remove(&output); 100 if (m_disabledOutputs.size() > 0) {
101 DCHECK(m_disabledOutputs.contains(&output));
102 m_disabledOutputs.remove(&output);
103 }
102 changedOutputs(); 104 changedOutputs();
103 105
104 // Propagate enabled state to outputs. 106 // Propagate enabled state to outputs.
105 handler().enableOutputsIfNecessary(); 107 handler().enableOutputsIfNecessary();
106 } 108 }
107 109
108 void AudioNodeInput::didUpdate() { 110 void AudioNodeInput::didUpdate() {
109 handler().checkNumberOfChannelsForInput(this); 111 handler().checkNumberOfChannelsForInput(this);
110 } 112 }
111 113
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 return internalSummingBus; 216 return internalSummingBus;
215 } 217 }
216 218
217 // Handle multiple connections case. 219 // Handle multiple connections case.
218 sumAllConnections(internalSummingBus, framesToProcess); 220 sumAllConnections(internalSummingBus, framesToProcess);
219 221
220 return internalSummingBus; 222 return internalSummingBus;
221 } 223 }
222 224
223 } // namespace blink 225 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/webaudio/audionode-disconnect-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698