Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Side by Side Diff: third_party/WebKit/Source/platform/audio/DynamicsCompressorKernel.cpp

Issue 2807593003: Revert of Convert RELEASE_ASSERT()/ASSERT(...) to CHECK()/DCHECK_op(...) in platform/audio (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 float attackTime, 209 float attackTime,
210 float releaseTime, 210 float releaseTime,
211 float preDelayTime, 211 float preDelayTime,
212 float dbPostGain, 212 float dbPostGain,
213 float effectBlend, /* equal power crossfade */ 213 float effectBlend, /* equal power crossfade */
214 214
215 float releaseZone1, 215 float releaseZone1,
216 float releaseZone2, 216 float releaseZone2,
217 float releaseZone3, 217 float releaseZone3,
218 float releaseZone4) { 218 float releaseZone4) {
219 DCHECK_EQ(m_preDelayBuffers.size(), numberOfChannels); 219 ASSERT(m_preDelayBuffers.size() == numberOfChannels);
220 220
221 float sampleRate = this->sampleRate(); 221 float sampleRate = this->sampleRate();
222 222
223 float dryMix = 1 - effectBlend; 223 float dryMix = 1 - effectBlend;
224 float wetMix = effectBlend; 224 float wetMix = effectBlend;
225 225
226 float k = updateStaticCurveParameters(dbThreshold, dbKnee, ratio); 226 float k = updateStaticCurveParameters(dbThreshold, dbKnee, ratio);
227 227
228 // Makeup gain. 228 // Makeup gain.
229 float fullRangeGain = saturate(1, k); 229 float fullRangeGain = saturate(1, k);
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 for (unsigned i = 0; i < m_preDelayBuffers.size(); ++i) 482 for (unsigned i = 0; i < m_preDelayBuffers.size(); ++i)
483 m_preDelayBuffers[i]->zero(); 483 m_preDelayBuffers[i]->zero();
484 484
485 m_preDelayReadIndex = 0; 485 m_preDelayReadIndex = 0;
486 m_preDelayWriteIndex = DefaultPreDelayFrames; 486 m_preDelayWriteIndex = DefaultPreDelayFrames;
487 487
488 m_maxAttackCompressionDiffDb = -1; // uninitialized state 488 m_maxAttackCompressionDiffDb = -1; // uninitialized state
489 } 489 }
490 490
491 } // namespace blink 491 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698