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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 | 120 |
121 double DynamicsCompressorHandler::latencyTime() const | 121 double DynamicsCompressorHandler::latencyTime() const |
122 { | 122 { |
123 return m_dynamicsCompressor->latencyTime(); | 123 return m_dynamicsCompressor->latencyTime(); |
124 } | 124 } |
125 | 125 |
126 // ---------------------------------------------------------------- | 126 // ---------------------------------------------------------------- |
127 | 127 |
128 DynamicsCompressorNode::DynamicsCompressorNode(AbstractAudioContext& context, fl
oat sampleRate) | 128 DynamicsCompressorNode::DynamicsCompressorNode(AbstractAudioContext& context, fl
oat sampleRate) |
129 : AudioNode(context) | 129 : AudioNode(context) |
130 , m_threshold(AudioParam::create(context, ParamTypeDynamicsCompressorThresho
ld, -24)) | 130 , m_threshold(AudioParam::create(context, ParamTypeDynamicsCompressorThresho
ld, -24, -100, 0)) |
131 , m_knee(AudioParam::create(context, ParamTypeDynamicsCompressorKnee, 30)) | 131 , m_knee(AudioParam::create(context, ParamTypeDynamicsCompressorKnee, 30, 0,
40)) |
132 , m_ratio(AudioParam::create(context, ParamTypeDynamicsCompressorRatio, 12)) | 132 , m_ratio(AudioParam::create(context, ParamTypeDynamicsCompressorRatio, 12,
1, 20)) |
133 , m_attack(AudioParam::create(context, ParamTypeDynamicsCompressorAttack, 0.
003)) | 133 , m_attack(AudioParam::create(context, ParamTypeDynamicsCompressorAttack, 0.
003, 0, 1)) |
134 , m_release(AudioParam::create(context, ParamTypeDynamicsCompressorRelease,
0.250)) | 134 , m_release(AudioParam::create(context, ParamTypeDynamicsCompressorRelease,
0.250, 0, 1)) |
135 { | 135 { |
136 setHandler(DynamicsCompressorHandler::create( | 136 setHandler(DynamicsCompressorHandler::create( |
137 *this, | 137 *this, |
138 sampleRate, | 138 sampleRate, |
139 m_threshold->handler(), | 139 m_threshold->handler(), |
140 m_knee->handler(), | 140 m_knee->handler(), |
141 m_ratio->handler(), | 141 m_ratio->handler(), |
142 m_attack->handler(), | 142 m_attack->handler(), |
143 m_release->handler())); | 143 m_release->handler())); |
144 } | 144 } |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 return m_attack; | 188 return m_attack; |
189 } | 189 } |
190 | 190 |
191 AudioParam* DynamicsCompressorNode::release() const | 191 AudioParam* DynamicsCompressorNode::release() const |
192 { | 192 { |
193 return m_release; | 193 return m_release; |
194 } | 194 } |
195 | 195 |
196 } // namespace blink | 196 } // namespace blink |
197 | 197 |
OLD | NEW |