| 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 * 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 // This will propagate the channel count to any nodes connected further
downstream in the graph. | 107 // This will propagate the channel count to any nodes connected further
downstream in the graph. |
| 108 output(0).setNumberOfChannels(numberOfChannels); | 108 output(0).setNumberOfChannels(numberOfChannels); |
| 109 initialize(); | 109 initialize(); |
| 110 } | 110 } |
| 111 | 111 |
| 112 AudioHandler::checkNumberOfChannelsForInput(input); | 112 AudioHandler::checkNumberOfChannelsForInput(input); |
| 113 } | 113 } |
| 114 | 114 |
| 115 // ---------------------------------------------------------------- | 115 // ---------------------------------------------------------------- |
| 116 | 116 |
| 117 GainNode::GainNode(AbstractAudioContext& context, float sampleRate) | 117 GainNode::GainNode(BaseAudioContext& context, float sampleRate) |
| 118 : AudioNode(context) | 118 : AudioNode(context) |
| 119 , m_gain(AudioParam::create(context, 1.0)) | 119 , m_gain(AudioParam::create(context, 1.0)) |
| 120 { | 120 { |
| 121 setHandler(GainHandler::create(*this, sampleRate, m_gain->handler())); | 121 setHandler(GainHandler::create(*this, sampleRate, m_gain->handler())); |
| 122 } | 122 } |
| 123 | 123 |
| 124 GainNode* GainNode::create(AbstractAudioContext& context, float sampleRate) | 124 GainNode* GainNode::create(BaseAudioContext& context, float sampleRate) |
| 125 { | 125 { |
| 126 return new GainNode(context, sampleRate); | 126 return new GainNode(context, sampleRate); |
| 127 } | 127 } |
| 128 | 128 |
| 129 AudioParam* GainNode::gain() const | 129 AudioParam* GainNode::gain() const |
| 130 { | 130 { |
| 131 return m_gain; | 131 return m_gain; |
| 132 } | 132 } |
| 133 | 133 |
| 134 DEFINE_TRACE(GainNode) | 134 DEFINE_TRACE(GainNode) |
| 135 { | 135 { |
| 136 visitor->trace(m_gain); | 136 visitor->trace(m_gain); |
| 137 AudioNode::trace(visitor); | 137 AudioNode::trace(visitor); |
| 138 } | 138 } |
| 139 | 139 |
| 140 } // namespace blink | 140 } // namespace blink |
| 141 | 141 |
| OLD | NEW |