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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 { | 54 { |
55 // These properties are fixed for the node and cannot be changed by user. | 55 // These properties are fixed for the node and cannot be changed by user. |
56 m_channelCount = 1; | 56 m_channelCount = 1; |
57 m_channelCountMode = Explicit; | 57 m_channelCountMode = Explicit; |
58 | 58 |
59 // Create the requested number of inputs. | 59 // Create the requested number of inputs. |
60 for (unsigned i = 0; i < numberOfInputs; ++i) | 60 for (unsigned i = 0; i < numberOfInputs; ++i) |
61 addInput(); | 61 addInput(); |
62 | 62 |
63 // Create the output with the requested number of channels. | 63 // Create the output with the requested number of channels. |
64 addOutput(AudioNodeOutput::create(this, numberOfInputs)); | 64 addOutput(numberOfInputs); |
65 | 65 |
66 initialize(); | 66 initialize(); |
67 } | 67 } |
68 | 68 |
69 void ChannelMergerNode::process(size_t framesToProcess) | 69 void ChannelMergerNode::process(size_t framesToProcess) |
70 { | 70 { |
71 AudioNodeOutput* output = this->output(0); | 71 AudioNodeOutput* output = this->output(0); |
72 ASSERT(output); | 72 ASSERT(output); |
73 ASSERT_UNUSED(framesToProcess, framesToProcess == output->bus()->length()); | 73 ASSERT_UNUSED(framesToProcess, framesToProcess == output->bus()->length()); |
74 | 74 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 ExceptionMessages::failedToSet( | 126 ExceptionMessages::failedToSet( |
127 "channelCountMode", | 127 "channelCountMode", |
128 "ChannelMergerNode", | 128 "ChannelMergerNode", |
129 "channelCountMode cannot be changed")); | 129 "channelCountMode cannot be changed")); |
130 } | 130 } |
131 } | 131 } |
132 | 132 |
133 } // namespace blink | 133 } // namespace blink |
134 | 134 |
135 #endif // ENABLE(WEB_AUDIO) | 135 #endif // ENABLE(WEB_AUDIO) |
OLD | NEW |