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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/DynamicsCompressor/dynamicscompressor-clear-internal-state.html

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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/webaudio/DynamicsCompressor/dynamicscompressor-clear-internal-state.html
diff --git a/third_party/WebKit/LayoutTests/webaudio/DynamicsCompressor/dynamicscompressor-clear-internal-state.html b/third_party/WebKit/LayoutTests/webaudio/DynamicsCompressor/dynamicscompressor-clear-internal-state.html
index 34f5cd20644a49647b77974560e338796c077219..9c5ae95cf6a9037efbd61c13c34ede6313695160 100644
--- a/third_party/WebKit/LayoutTests/webaudio/DynamicsCompressor/dynamicscompressor-clear-internal-state.html
+++ b/third_party/WebKit/LayoutTests/webaudio/DynamicsCompressor/dynamicscompressor-clear-internal-state.html
@@ -17,8 +17,10 @@
let source;
let compressor;
- let sampleRate = 44100;
- let testDurationSamples = 44100;
+ // Use a low sample rate to reduce complexity because we need to run for
+ // quite a few seconds to get the reduction to converge.
+ let sampleRate = 8192;
+ let testDurationSamples = 10 * 8192;
audit.define(
{
@@ -46,8 +48,12 @@
// Render it!
context.startRendering().then(() => {
- // Check that the reduction value is 0.0.
- should(compressor.reduction, 'compressor.reduction').beEqualTo(0);
+ // Check that the reduction value sufficiently close to 0.
+ // Threshold experimentally determined.
+ should(
+ Math.abs(compressor.reduction),
+ 'Math.abs(compressor.reduction)')
+ .beLessThanOrEqualTo(4.8223e-2);
task.done();
});
});

Powered by Google App Engine
This is Rietveld 408576698