OLD | NEW |
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 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 25 matching lines...) Expand all Loading... |
36 #include "modules/webaudio/BaseAudioContext.h" | 36 #include "modules/webaudio/BaseAudioContext.h" |
37 | 37 |
38 | 38 |
39 namespace blink { | 39 namespace blink { |
40 | 40 |
41 ChannelMergerHandler::ChannelMergerHandler(AudioNode& node, float sampleRate, un
signed numberOfInputs) | 41 ChannelMergerHandler::ChannelMergerHandler(AudioNode& node, float sampleRate, un
signed numberOfInputs) |
42 : AudioHandler(NodeTypeChannelMerger, node, sampleRate) | 42 : AudioHandler(NodeTypeChannelMerger, node, sampleRate) |
43 { | 43 { |
44 // These properties are fixed for the node and cannot be changed by user. | 44 // These properties are fixed for the node and cannot be changed by user. |
45 m_channelCount = 1; | 45 m_channelCount = 1; |
46 setInternalChannelCountMode(Explicit); | 46 m_channelCountMode = Explicit; |
47 | 47 |
48 // Create the requested number of inputs. | 48 // Create the requested number of inputs. |
49 for (unsigned i = 0; i < numberOfInputs; ++i) | 49 for (unsigned i = 0; i < numberOfInputs; ++i) |
50 addInput(); | 50 addInput(); |
51 | 51 |
52 // Create the output with the requested number of channels. | 52 // Create the output with the requested number of channels. |
53 addOutput(numberOfInputs); | 53 addOutput(numberOfInputs); |
54 | 54 |
55 initialize(); | 55 initialize(); |
56 } | 56 } |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 BaseAudioContext::maxNumberOfChannels(), | 153 BaseAudioContext::maxNumberOfChannels(), |
154 ExceptionMessages::InclusiveBound)); | 154 ExceptionMessages::InclusiveBound)); |
155 return nullptr; | 155 return nullptr; |
156 } | 156 } |
157 | 157 |
158 return new ChannelMergerNode(context, numberOfInputs); | 158 return new ChannelMergerNode(context, numberOfInputs); |
159 } | 159 } |
160 | 160 |
161 } // namespace blink | 161 } // namespace blink |
162 | 162 |
OLD | NEW |