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 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 m_kneeThresholdDb = dbThreshold + dbKnee; | 194 m_kneeThresholdDb = dbThreshold + dbKnee; |
195 m_kneeThreshold = decibelsToLinear(m_kneeThresholdDb); | 195 m_kneeThreshold = decibelsToLinear(m_kneeThresholdDb); |
196 | 196 |
197 m_ykneeThresholdDb = linearToDecibels(kneeCurve(m_kneeThreshold, k)); | 197 m_ykneeThresholdDb = linearToDecibels(kneeCurve(m_kneeThreshold, k)); |
198 | 198 |
199 m_K = k; | 199 m_K = k; |
200 } | 200 } |
201 return m_K; | 201 return m_K; |
202 } | 202 } |
203 | 203 |
204 void DynamicsCompressorKernel::process(float* sourceChannels[], | 204 void DynamicsCompressorKernel::process(const float* sourceChannels[], |
205 float* destinationChannels[], | 205 float* destinationChannels[], |
206 unsigned numberOfChannels, | 206 unsigned numberOfChannels, |
207 unsigned framesToProcess, | 207 unsigned framesToProcess, |
208 | 208 |
209 float dbThreshold, | 209 float dbThreshold, |
210 float dbKnee, | 210 float dbKnee, |
211 float ratio, | 211 float ratio, |
212 float attackTime, | 212 float attackTime, |
213 float releaseTime, | 213 float releaseTime, |
214 float preDelayTime, | 214 float preDelayTime, |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 | 470 |
471 m_preDelayReadIndex = 0; | 471 m_preDelayReadIndex = 0; |
472 m_preDelayWriteIndex = DefaultPreDelayFrames; | 472 m_preDelayWriteIndex = DefaultPreDelayFrames; |
473 | 473 |
474 m_maxAttackCompressionDiffDb = -1; // uninitialized state | 474 m_maxAttackCompressionDiffDb = -1; // uninitialized state |
475 } | 475 } |
476 | 476 |
477 } // namespace WebCore | 477 } // namespace WebCore |
478 | 478 |
479 #endif // ENABLE(WEB_AUDIO) | 479 #endif // ENABLE(WEB_AUDIO) |
OLD | NEW |