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

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

Issue 2276973002: Revert CL 2242573002 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // Regardless of the allowed buffer sizes, we still need to process at the g ranularity of the AudioNode. 49 // Regardless of the allowed buffer sizes, we still need to process at the g ranularity of the AudioNode.
50 if (m_bufferSize < ProcessingSizeInFrames) 50 if (m_bufferSize < ProcessingSizeInFrames)
51 m_bufferSize = ProcessingSizeInFrames; 51 m_bufferSize = ProcessingSizeInFrames;
52 52
53 DCHECK_LE(numberOfInputChannels, BaseAudioContext::maxNumberOfChannels()); 53 DCHECK_LE(numberOfInputChannels, BaseAudioContext::maxNumberOfChannels());
54 54
55 addInput(); 55 addInput();
56 addOutput(numberOfOutputChannels); 56 addOutput(numberOfOutputChannels);
57 57
58 m_channelCount = numberOfInputChannels; 58 m_channelCount = numberOfInputChannels;
59 setInternalChannelCountMode(Explicit); 59 m_channelCountMode = Explicit;
60 60
61 initialize(); 61 initialize();
62 } 62 }
63 63
64 PassRefPtr<ScriptProcessorHandler> ScriptProcessorHandler::create(AudioNode& nod e, float sampleRate, size_t bufferSize, unsigned numberOfInputChannels, unsigned numberOfOutputChannels) 64 PassRefPtr<ScriptProcessorHandler> ScriptProcessorHandler::create(AudioNode& nod e, float sampleRate, size_t bufferSize, unsigned numberOfInputChannels, unsigned numberOfOutputChannels)
65 { 65 {
66 return adoptRef(new ScriptProcessorHandler(node, sampleRate, bufferSize, num berOfInputChannels, numberOfOutputChannels)); 66 return adoptRef(new ScriptProcessorHandler(node, sampleRate, bufferSize, num berOfInputChannels, numberOfOutputChannels));
67 } 67 }
68 68
69 ScriptProcessorHandler::~ScriptProcessorHandler() 69 ScriptProcessorHandler::~ScriptProcessorHandler()
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 // If |onaudioprocess| event handler is defined, the node should not be 432 // If |onaudioprocess| event handler is defined, the node should not be
433 // GCed even if it is out of scope. 433 // GCed even if it is out of scope.
434 if (hasEventListeners(EventTypeNames::audioprocess)) 434 if (hasEventListeners(EventTypeNames::audioprocess))
435 return true; 435 return true;
436 436
437 return false; 437 return false;
438 } 438 }
439 439
440 } // namespace blink 440 } // namespace blink
441 441
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698