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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/IIRDSPKernel.cpp

Issue 2159403002: Replace ASSERT with DCHECK in WebAudio (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "modules/webaudio/IIRDSPKernel.h" 5 #include "modules/webaudio/IIRDSPKernel.h"
6 6
7 #include "platform/FloatConversion.h" 7 #include "platform/FloatConversion.h"
8 8
9 namespace blink { 9 namespace blink {
10 10
11 void IIRDSPKernel::process(const float* source, float* destination, size_t frame sToProcess) 11 void IIRDSPKernel::process(const float* source, float* destination, size_t frame sToProcess)
12 { 12 {
13 ASSERT(source); 13 DCHECK(source);
14 ASSERT(destination); 14 DCHECK(destination);
15 15
16 m_iir.process(source, destination, framesToProcess); 16 m_iir.process(source, destination, framesToProcess);
17 } 17 }
18 18
19 void IIRDSPKernel::getFrequencyResponse(int nFrequencies, const float* frequency Hz, float* magResponse, float* phaseResponse) 19 void IIRDSPKernel::getFrequencyResponse(int nFrequencies, const float* frequency Hz, float* magResponse, float* phaseResponse)
20 { 20 {
21 bool isGood = nFrequencies > 0 && frequencyHz && magResponse && phaseRespons e; 21 bool isGood = nFrequencies > 0 && frequencyHz && magResponse && phaseRespons e;
22 ASSERT(isGood); 22 DCHECK(isGood);
23 if (!isGood) 23 if (!isGood)
24 return; 24 return;
25 25
26 Vector<float> frequency(nFrequencies); 26 Vector<float> frequency(nFrequencies);
27 27
28 double nyquist = this->nyquist(); 28 double nyquist = this->nyquist();
29 29
30 // Convert from frequency in Hz to normalized frequency (0 -> 1), 30 // Convert from frequency in Hz to normalized frequency (0 -> 1),
31 // with 1 equal to the Nyquist frequency. 31 // with 1 equal to the Nyquist frequency.
32 for (int k = 0; k < nFrequencies; ++k) 32 for (int k = 0; k < nFrequencies; ++k)
(...skipping 12 matching lines...) Expand all
45 // no constraint on the IIR filter that it be stable.) 45 // no constraint on the IIR filter that it be stable.)
46 return std::numeric_limits<double>::infinity(); 46 return std::numeric_limits<double>::infinity();
47 } 47 }
48 48
49 double IIRDSPKernel::latencyTime() const 49 double IIRDSPKernel::latencyTime() const
50 { 50 {
51 return 0; 51 return 0;
52 } 52 }
53 53
54 } // namespace blink 54 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/webaudio/GainNode.cpp ('k') | third_party/WebKit/Source/modules/webaudio/IIRProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698