| 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 GainNode* GainNode::Create(BaseAudioContext* context, | 162 GainNode* GainNode::Create(BaseAudioContext* context, |
| 163 const GainOptions& options, | 163 const GainOptions& options, |
| 164 ExceptionState& exception_state) { | 164 ExceptionState& exception_state) { |
| 165 GainNode* node = Create(*context, exception_state); | 165 GainNode* node = Create(*context, exception_state); |
| 166 | 166 |
| 167 if (!node) | 167 if (!node) |
| 168 return nullptr; | 168 return nullptr; |
| 169 | 169 |
| 170 node->HandleChannelOptions(options, exception_state); | 170 node->HandleChannelOptions(options, exception_state); |
| 171 | 171 |
| 172 if (options.hasGain()) | 172 node->gain()->setValue(options.gain()); |
| 173 node->gain()->setValue(options.gain()); | |
| 174 | 173 |
| 175 return node; | 174 return node; |
| 176 } | 175 } |
| 177 | 176 |
| 178 AudioParam* GainNode::gain() const { | 177 AudioParam* GainNode::gain() const { |
| 179 return gain_; | 178 return gain_; |
| 180 } | 179 } |
| 181 | 180 |
| 182 DEFINE_TRACE(GainNode) { | 181 DEFINE_TRACE(GainNode) { |
| 183 visitor->Trace(gain_); | 182 visitor->Trace(gain_); |
| 184 AudioNode::Trace(visitor); | 183 AudioNode::Trace(visitor); |
| 185 } | 184 } |
| 186 | 185 |
| 187 } // namespace blink | 186 } // namespace blink |
| OLD | NEW |