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

Side by Side Diff: Source/WebCore/webaudio/AudioNode.cpp

Issue 7809009: Merge 94127 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
Patch Set: Created 9 years, 3 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 | « no previous file | 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 return false; 118 return false;
119 if (destination && inputIndex >= destination->numberOfInputs()) 119 if (destination && inputIndex >= destination->numberOfInputs())
120 return false; 120 return false;
121 121
122 AudioNodeOutput* output = this->output(outputIndex); 122 AudioNodeOutput* output = this->output(outputIndex);
123 if (!destination) { 123 if (!destination) {
124 // Disconnect output from any inputs it may be currently connected to. 124 // Disconnect output from any inputs it may be currently connected to.
125 output->disconnectAllInputs(); 125 output->disconnectAllInputs();
126 return true; 126 return true;
127 } 127 }
128
129 if (context() != destination->context())
130 return false;
128 131
129 AudioNodeInput* input = destination->input(inputIndex); 132 AudioNodeInput* input = destination->input(inputIndex);
130 input->connect(output); 133 input->connect(output);
131 134
132 // Let context know that a connection has been made. 135 // Let context know that a connection has been made.
133 context()->incrementConnectionCount(); 136 context()->incrementConnectionCount();
134 137
135 return true; 138 return true;
136 } 139 }
137 140
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 printf("%d: %d\n", i, s_nodeCount[i]); 316 printf("%d: %d\n", i, s_nodeCount[i]);
314 317
315 printf("===========================\n\n\n"); 318 printf("===========================\n\n\n");
316 } 319 }
317 320
318 #endif // DEBUG_AUDIONODE_REFERENCES 321 #endif // DEBUG_AUDIONODE_REFERENCES
319 322
320 } // namespace WebCore 323 } // namespace WebCore
321 324
322 #endif // ENABLE(WEB_AUDIO) 325 #endif // ENABLE(WEB_AUDIO)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698