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

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

Issue 2839063003: Implement tail processing for AudioNodes (Closed)
Patch Set: Make declaration order consistent Created 3 years, 5 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/wtf/MathExtras.h" 7 #include "platform/wtf/MathExtras.h"
8 8
9 namespace blink { 9 namespace blink {
10 10
(...skipping 28 matching lines...) Expand all
39 39
40 // Convert from frequency in Hz to normalized frequency (0 -> 1), 40 // Convert from frequency in Hz to normalized frequency (0 -> 1),
41 // with 1 equal to the Nyquist frequency. 41 // with 1 equal to the Nyquist frequency.
42 for (int k = 0; k < n_frequencies; ++k) 42 for (int k = 0; k < n_frequencies; ++k)
43 frequency[k] = frequency_hz[k] / nyquist; 43 frequency[k] = frequency_hz[k] / nyquist;
44 44
45 iir_.GetFrequencyResponse(n_frequencies, frequency.data(), mag_response, 45 iir_.GetFrequencyResponse(n_frequencies, frequency.data(), mag_response,
46 phase_response); 46 phase_response);
47 } 47 }
48 48
49 bool IIRDSPKernel::RequiresTailProcessing() const {
50 // Always return true even if the tail time and latency might both
51 // be zero.
52 return true;
53 }
54
49 double IIRDSPKernel::TailTime() const { 55 double IIRDSPKernel::TailTime() const {
50 return tail_time_; 56 return tail_time_;
51 } 57 }
52 58
53 double IIRDSPKernel::LatencyTime() const { 59 double IIRDSPKernel::LatencyTime() const {
54 return 0; 60 return 0;
55 } 61 }
56 62
57 } // namespace blink 63 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698