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