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

Side by Side Diff: Source/modules/webaudio/ChannelSplitterNode.cpp

Issue 614373007: Oilpan: Remove adoptRefCountedGarbageCollected (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/modules/webaudio/ChannelMergerNode.cpp ('k') | Source/modules/webaudio/ConvolverNode.h » ('j') | 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 21 matching lines...) Expand all
32 #include "modules/webaudio/AudioNodeInput.h" 32 #include "modules/webaudio/AudioNodeInput.h"
33 #include "modules/webaudio/AudioNodeOutput.h" 33 #include "modules/webaudio/AudioNodeOutput.h"
34 34
35 namespace blink { 35 namespace blink {
36 36
37 ChannelSplitterNode* ChannelSplitterNode::create(AudioContext* context, float sa mpleRate, unsigned numberOfOutputs) 37 ChannelSplitterNode* ChannelSplitterNode::create(AudioContext* context, float sa mpleRate, unsigned numberOfOutputs)
38 { 38 {
39 if (!numberOfOutputs || numberOfOutputs > AudioContext::maxNumberOfChannels( )) 39 if (!numberOfOutputs || numberOfOutputs > AudioContext::maxNumberOfChannels( ))
40 return 0; 40 return 0;
41 41
42 return adoptRefCountedGarbageCollectedWillBeNoop(new ChannelSplitterNode(con text, sampleRate, numberOfOutputs)); 42 return new ChannelSplitterNode(context, sampleRate, numberOfOutputs);
43 } 43 }
44 44
45 ChannelSplitterNode::ChannelSplitterNode(AudioContext* context, float sampleRate , unsigned numberOfOutputs) 45 ChannelSplitterNode::ChannelSplitterNode(AudioContext* context, float sampleRate , unsigned numberOfOutputs)
46 : AudioNode(context, sampleRate) 46 : AudioNode(context, sampleRate)
47 { 47 {
48 addInput(); 48 addInput();
49 49
50 // Create a fixed number of outputs (able to handle the maximum number of ch annels fed to an input). 50 // Create a fixed number of outputs (able to handle the maximum number of ch annels fed to an input).
51 for (unsigned i = 0; i < numberOfOutputs; ++i) 51 for (unsigned i = 0; i < numberOfOutputs; ++i)
52 addOutput(AudioNodeOutput::create(this, 1)); 52 addOutput(AudioNodeOutput::create(this, 1));
(...skipping 21 matching lines...) Expand all
74 } else if (output(i)->renderingFanOutCount() > 0) { 74 } else if (output(i)->renderingFanOutCount() > 0) {
75 // Only bother zeroing out the destination if it's connected to anyt hing 75 // Only bother zeroing out the destination if it's connected to anyt hing
76 destination->zero(); 76 destination->zero();
77 } 77 }
78 } 78 }
79 } 79 }
80 80
81 } // namespace blink 81 } // namespace blink
82 82
83 #endif // ENABLE(WEB_AUDIO) 83 #endif // ENABLE(WEB_AUDIO)
OLDNEW
« no previous file with comments | « Source/modules/webaudio/ChannelMergerNode.cpp ('k') | Source/modules/webaudio/ConvolverNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698