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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/BiquadFilter/tail-time-highshelf.html

Issue 2919503002: Revert of Compute tail time from Biquad coefficients (Closed)
Patch Set: Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/webaudio/BiquadFilter/tail-time-highshelf.html
diff --git a/third_party/WebKit/LayoutTests/webaudio/BiquadFilter/tail-time-highshelf.html b/third_party/WebKit/LayoutTests/webaudio/BiquadFilter/tail-time-highshelf.html
deleted file mode 100644
index 0b3a2ae3c789a65685698ac836dae481c0002719..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/webaudio/BiquadFilter/tail-time-highshelf.html
+++ /dev/null
@@ -1,81 +0,0 @@
-<!doctype html>
-<html>
- <head>
- <title>Test Biquad Tail-Time</title>
- <script src="../../resources/testharness.js"></script>
- <script src="../../resources/testharnessreport.js"></script>
- <script src="../resources/audit-util.js"></script>
- <script src="../resources/audit.js"></script>
- <script src="../resources/biquad-filters.js"></script>
- <script src="test-tail-time.js"></script>
- </head>
-
- <body>
- <script>
- let audit = Audit.createTaskRunner();
-
- let sampleRate = 16384;
- let renderSeconds = 1;
- let renderFrames = renderSeconds * sampleRate;
-
- // For a highshelf filter:
- // b0 = A*[(A+1)+(A−1)*cos(w0)+2*as*sqrt(A)]
- // b1 = 2*A*[(A-1)+(A+1)*cos(w0)]
- // b2 = A*[(A+1)+(A−1)*cos(w0)-2*as*sqrt(A)]
- // a0 = (A+1)-(A-1)*cos(w0)+2*as*sqrt(A)
- // a1 = -2*[(A-1)-(A+1)*cos(w0)]
- // a2 = (A+1)-(A-1)*cos(w0)-2*as*sqrt(A)
- //
- // where as = sin(w0)/sqrt(2), w0 = 2*%pi*f0/Fs, and A = 10^(G/40)
- //
- // The poles of this filter are
- //
- // -a2/(2*a0) +/- sqrt(a1^2-4*a0*a2)/(2*a0).
- //
- // Thus, the poles depend on the sign of d = a1^2-4*a0*a2 =
- // 16*A*(as^2-sin(w0)^2) = -8*A*sin(w0)^2. Thus, the poles are always
- // complex except if w0 = 0, in which case there is a repeated pole at 0.
-
- // Array of tests to run. |descripton| is the task description for
- // audit.define. |parameters| is option for |testTailTime|.
- let tests = [
- {
- descripton:
- {label: 'highshelf-complex-roots', description: 'complex roots'},
- parameters: {
- prefix: 'Highshelf complex roots',
- filterOptions:
- {type: 'highshelf', gain: 40, frequency: sampleRate / 8},
- // Node computed tail frame is 18.6 frames, which matches the actual
- // tail, so tail output should be exactly zero.
- threshold: 0
- }
- },
- {
- descripton: {
- label: 'highshelf-repeated-roots',
- description: 'repeated real root'
- },
- parameters: {
- prefix: 'Highshelf repeated roots',
- filterOptions: {type: 'highshelf', gain: 40, frequency: 0},
- // Node computed tail frame is 2 frames, which matches the actual
- // tail, so tail output should be exactly zero.
- threshold: 0
- }
- },
- ];
-
- // Define an appropriate task for each test.
- tests.forEach(entry => {
- audit.define(entry.descripton, (task, should) => {
- let context = new OfflineAudioContext(1, renderFrames, sampleRate);
- testTailTime(should, context, entry.parameters)
- .then(() => task.done());
- });
- });
-
- audit.run();
- </script>
- </body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698