| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 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 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 // Set output to stereo by default. | 34 // Set output to stereo by default. |
| 35 static const unsigned defaultNumberOfOutputChannels = 2; | 35 static const unsigned defaultNumberOfOutputChannels = 2; |
| 36 | 36 |
| 37 namespace blink { | 37 namespace blink { |
| 38 | 38 |
| 39 DynamicsCompressorNode::DynamicsCompressorNode(AudioContext* context, float samp
leRate) | 39 DynamicsCompressorNode::DynamicsCompressorNode(AudioContext* context, float samp
leRate) |
| 40 : AudioNode(NodeTypeDynamicsCompressor, context, sampleRate) | 40 : AudioNode(NodeTypeDynamicsCompressor, context, sampleRate) |
| 41 { | 41 { |
| 42 addInput(); | 42 addInput(); |
| 43 addOutput(AudioNodeOutput::create(this, defaultNumberOfOutputChannels)); | 43 addOutput(defaultNumberOfOutputChannels); |
| 44 | 44 |
| 45 m_threshold = AudioParam::create(context, -24); | 45 m_threshold = AudioParam::create(context, -24); |
| 46 m_knee = AudioParam::create(context, 30); | 46 m_knee = AudioParam::create(context, 30); |
| 47 m_ratio = AudioParam::create(context, 12); | 47 m_ratio = AudioParam::create(context, 12); |
| 48 m_reduction = AudioParam::create(context, 0); | 48 m_reduction = AudioParam::create(context, 0); |
| 49 m_attack = AudioParam::create(context, 0.003); | 49 m_attack = AudioParam::create(context, 0.003); |
| 50 m_release = AudioParam::create(context, 0.250); | 50 m_release = AudioParam::create(context, 0.250); |
| 51 | 51 |
| 52 initialize(); | 52 initialize(); |
| 53 } | 53 } |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 visitor->trace(m_ratio); | 126 visitor->trace(m_ratio); |
| 127 visitor->trace(m_reduction); | 127 visitor->trace(m_reduction); |
| 128 visitor->trace(m_attack); | 128 visitor->trace(m_attack); |
| 129 visitor->trace(m_release); | 129 visitor->trace(m_release); |
| 130 AudioNode::trace(visitor); | 130 AudioNode::trace(visitor); |
| 131 } | 131 } |
| 132 | 132 |
| 133 } // namespace blink | 133 } // namespace blink |
| 134 | 134 |
| 135 #endif // ENABLE(WEB_AUDIO) | 135 #endif // ENABLE(WEB_AUDIO) |
| OLD | NEW |