⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 267357 in webkit


Ignore:
Timestamp:
Sep 21, 2020, 12:51:02 PM (6 years ago)
Author:
Chris Dumez
Message:

Vectorize linearRampToValueAtTime processing in AudioParamTimeline
https://bugs.webkit.org/show_bug.cgi?id=216788

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline WPT tests now that more checks are passing.

  • web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-linearRampToValueAtTime-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-panner-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/retrospective-setValueAtTime-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-biquadfilternode-interface/biquad-automation-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/realtime-conv-expected.txt:

Source/WebCore:

Vectorize linearRampToValueAtTime processing in AudioParamTimeline. This patch is based on
the Blink implementation at [1] but updated to use VectorMath to work on more platforms.

We were failing some tests due to precision issues in our linearRampToValueAtTime implementation.
Those tests are now passing since our implementation matches Blink's more closely.

[1] https://github.com/chromium/chromium/blob/master/third_party/blink/renderer/modules/webaudio/audio_param_timeline.cc

No new tests, rebaselined existing tests.

  • Modules/webaudio/AudioParamTimeline.cpp:

(WebCore::AudioParamTimeline::valuesForTimeRangeImpl):
(WebCore::AudioParamTimeline::processLinearRamp):

  • Modules/webaudio/AudioParamTimeline.h:

LayoutTests:

  • webaudio/AudioParam/audioparam-cancel-and-hold-expected.txt:
  • webaudio/AudioParam/audioparam-negative-exponentialRamp-expected.txt:
  • webaudio/AudioParam/audioparam-setTargetAtTime-continuous-expected.txt:

Rebaseline existing tests now that more checks are passing.

  • webaudio/audioparam-linearRampToValueAtTime-expected.txt: Removed.
  • webaudio/audioparam-linearRampToValueAtTime.html: Removed.

Drop outdated test. This test was imported into WPT and now resides at:

  • imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-linearRampToValueAtTime.html
Location:
trunk
Files:
2 deleted
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r267349 r267357  
     12020-09-21  Chris Dumez  <cdumez@apple.com>
     2
     3        Vectorize linearRampToValueAtTime processing in AudioParamTimeline
     4        https://bugs.webkit.org/show_bug.cgi?id=216788
     5
     6        Reviewed by Darin Adler.
     7
     8        * webaudio/AudioParam/audioparam-cancel-and-hold-expected.txt:
     9        * webaudio/AudioParam/audioparam-negative-exponentialRamp-expected.txt:
     10        * webaudio/AudioParam/audioparam-setTargetAtTime-continuous-expected.txt:
     11        Rebaseline existing tests now that more checks are passing.
     12
     13        * webaudio/audioparam-linearRampToValueAtTime-expected.txt: Removed.
     14        * webaudio/audioparam-linearRampToValueAtTime.html: Removed.
     15        Drop outdated test. This test was imported into WPT and now resides at:
     16        - imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-linearRampToValueAtTime.html
     17
    1182020-09-21  Chris Dumez  <cdumez@apple.com>
    219
  • trunk/LayoutTests/TestExpectations

    r267333 r267357  
    325325
    326326# Webaudio tests that are flaky.
    327 imported/w3c/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/realtime-conv.html [ Pass Failure ]
    328327imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-stereo-panner.html [ Pass Failure ]
    329328
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r267354 r267357  
     12020-09-21  Chris Dumez  <cdumez@apple.com>
     2
     3        Vectorize linearRampToValueAtTime processing in AudioParamTimeline
     4        https://bugs.webkit.org/show_bug.cgi?id=216788
     5
     6        Reviewed by Darin Adler.
     7
     8        Rebaseline WPT tests now that more checks are passing.
     9
     10        * web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-linearRampToValueAtTime-expected.txt:
     11        * web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-panner-expected.txt:
     12        * web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/retrospective-setValueAtTime-expected.txt:
     13        * web-platform-tests/webaudio/the-audio-api/the-biquadfilternode-interface/biquad-automation-expected.txt:
     14        * web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/realtime-conv-expected.txt:
     15
    1162020-09-21  Sam Sneddon  <gsnedders@apple.com>
    217
  • trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-linearRampToValueAtTime-expected.txt

    r266746 r267357  
    55PASS > [test] AudioParam linearRampToValueAtTime() functionality
    66PASS   Number of tests started and ended at the correct time is equal to 100.
    7 PASS   Max error for test 0 at offset 1254 is less than or equal to 0.000001865.
    8 PASS   Max error for test 1 at offset 2561 is less than or equal to 0.000001865.
    9 PASS   Max error for test 2 at offset 2731 is less than or equal to 0.000001865.
    10 PASS   Max error for test 3 at offset 3980 is less than or equal to 0.000001865.
    11 PASS   Max error for test 4 at offset 6599 is less than or equal to 0.000001865.
    12 PASS   Max error for test 5 at offset 6700 is less than or equal to 0.000001865.
    13 PASS   Max error for test 6 at offset 9245 is less than or equal to 0.000001865.
    14 PASS   Max error for test 7 at offset 10568 is less than or equal to 0.000001865.
    15 PASS   Max error for test 8 at offset 10669 is less than or equal to 0.000001865.
    16 PASS   Max error for test 9 at offset 13219 is less than or equal to 0.000001865.
    17 PASS   Max error for test 10 at offset 14468 is less than or equal to 0.000001865.
    18 PASS   Max error for test 11 at offset 14638 is less than or equal to 0.000001865.
    19 PASS   Max error for test 12 at offset 17114 is less than or equal to 0.000001865.
    20 PASS   Max error for test 13 at offset 18437 is less than or equal to 0.000001865.
    21 PASS   Max error for test 14 at offset 18607 is less than or equal to 0.000001865.
    22 PASS   Max error for test 15 at offset 21083 is less than or equal to 0.000001865.
    23 PASS   Max error for test 16 at offset 22480 is less than or equal to 0.000001865.
    24 PASS   Max error for test 17 at offset 22576 is less than or equal to 0.000001865.
    25 PASS   Max error for test 18 at offset 25121 is less than or equal to 0.000001865.
    26 PASS   Max error for test 19 at offset 26444 is less than or equal to 0.000001865.
    27 PASS   Max error for test 20 at offset 26545 is less than or equal to 0.000001865.
    28 PASS   Max error for test 21 at offset 29090 is less than or equal to 0.000001865.
    29 PASS   Max error for test 22 at offset 29117 is less than or equal to 0.000001865.
    30 PASS   Max error for test 23 at offset 30514 is less than or equal to 0.000001865.
    31 PASS   Max error for test 24 at offset 32990 is less than or equal to 0.000001865.
    32 PASS   Max error for test 25 at offset 34313 is less than or equal to 0.000001865.
    33 PASS   Max error for test 26 at offset 34483 is less than or equal to 0.000001865.
    34 PASS   Max error for test 27 at offset 36959 is less than or equal to 0.000001865.
    35 PASS   Max error for test 28 at offset 37129 is less than or equal to 0.000001865.
    36 PASS   Max error for test 29 at offset 38452 is less than or equal to 0.000001865.
    37 PASS   Max error for test 30 at offset 40997 is less than or equal to 0.000001865.
    38 PASS   Max error for test 31 at offset 42320 is less than or equal to 0.000001865.
    39 PASS   Max error for test 32 at offset 42421 is less than or equal to 0.000001865.
    40 PASS   Max error for test 33 at offset 44966 is less than or equal to 0.000001865.
    41 PASS   Max error for test 34 at offset 45067 is less than or equal to 0.000001865.
    42 PASS   Max error for test 35 at offset 46390 is less than or equal to 0.000001865.
    43 PASS   Max error for test 36 at offset 48866 is less than or equal to 0.000001865.
    44 PASS   Max error for test 37 at offset 49036 is less than or equal to 0.000001865.
    45 PASS   Max error for test 38 at offset 50359 is less than or equal to 0.000001865.
    46 PASS   Max error for test 39 at offset 52835 is less than or equal to 0.000001865.
    47 PASS   Max error for test 40 at offset 53005 is less than or equal to 0.000001865.
    48 PASS   Max error for test 41 at offset 54328 is less than or equal to 0.000001865.
    49 PASS   Max error for test 42 at offset 56873 is less than or equal to 0.000001865.
    50 PASS   Max error for test 43 at offset 56974 is less than or equal to 0.000001865.
    51 PASS   Max error for test 44 at offset 59519 is less than or equal to 0.000001865.
    52 PASS   Max error for test 45 at offset 60842 is less than or equal to 0.000001865.
    53 PASS   Max error for test 46 at offset 60943 is less than or equal to 0.000001865.
    54 PASS   Max error for test 47 at offset 62266 is less than or equal to 0.000001865.
    55 PASS   Max error for test 48 at offset 64742 is less than or equal to 0.000001865.
    56 PASS   Max error for test 49 at offset 64912 is less than or equal to 0.000001865.
    57 PASS   Max error for test 50 at offset 67388 is less than or equal to 0.000001865.
    58 PASS   Max error for test 51 at offset 68703 is less than or equal to 0.000001865.
    59 PASS   Max error for test 52 at offset 70111 is less than or equal to 0.000001865.
    60 PASS   Max error for test 53 at offset 71434 is less than or equal to 0.000001865.
    61 PASS   Max error for test 54 at offset 71519 is less than or equal to 0.000001865.
    62 PASS   Max error for test 55 at offset 72842 is less than or equal to 0.000001865.
    63 PASS   Max error for test 56 at offset 75318 is less than or equal to 0.000001865.
    64 PASS   Max error for test 57 at offset 76641 is less than or equal to 0.000001865.
    65 PASS   Max error for test 58 at offset 78049 is less than or equal to 0.000001865.
    66 PASS   Max error for test 59 at offset 78134 is less than or equal to 0.000001865.
    67 PASS   Max error for test 60 at offset 79457 is less than or equal to 0.000001865.
    68 PASS   Max error for test 61 at offset 80780 is less than or equal to 0.000001865.
    69 PASS   Max error for test 62 at offset 83256 is less than or equal to 0.000001865.
    70 PASS   Max error for test 63 at offset 84579 is less than or equal to 0.000001865.
    71 PASS   Max error for test 64 at offset 84749 is less than or equal to 0.000001865.
    72 PASS   Max error for test 65 at offset 86072 is less than or equal to 0.000001865.
    73 PASS   Max error for test 66 at offset 87395 is less than or equal to 0.000001865.
    74 PASS   Max error for test 67 at offset 89956 is less than or equal to 0.000001865.
    75 PASS   Max error for test 68 at offset 91194 is less than or equal to 0.000001865.
    76 PASS   Max error for test 69 at offset 92517 is less than or equal to 0.000001865.
    77 PASS   Max error for test 70 at offset 92687 is less than or equal to 0.000001865.
    78 PASS   Max error for test 71 at offset 94010 is less than or equal to 0.000001865.
    79 PASS   Max error for test 72 at offset 96571 is less than or equal to 0.000001865.
    80 PASS   Max error for test 73 at offset 97894 is less than or equal to 0.000001865.
    81 PASS   Max error for test 74 at offset 99132 is less than or equal to 0.000001865.
    82 PASS   Max error for test 75 at offset 100536 is less than or equal to 0.000001865.
    83 PASS   Max error for test 76 at offset 100552 is less than or equal to 0.000001865.
    84 PASS   Max error for test 77 at offset 103190 is less than or equal to 0.000001865.
    85 PASS   Max error for test 78 at offset 104505 is less than or equal to 0.000001865.
    86 PASS   Max error for test 79 at offset 104598 is less than or equal to 0.000001865.
    87 PASS   Max error for test 80 at offset 105921 is less than or equal to 0.000001865.
    88 PASS   Max error for test 81 at offset 108474 is less than or equal to 0.000001865.
    89 PASS   Max error for test 82 at offset 108567 is less than or equal to 0.000001865.
    90 PASS   Max error for test 83 at offset 111128 is less than or equal to 0.000001865.
    91 PASS   Max error for test 84 at offset 112443 is less than or equal to 0.000001865.
    92 PASS   Max error for test 85 at offset 112459 is less than or equal to 0.000001865.
    93 PASS   Max error for test 86 at offset 115097 is less than or equal to 0.000001865.
    94 PASS   Max error for test 87 at offset 115182 is less than or equal to 0.000001865.
     7PASS   Max error for test 0 at offset 1277 is less than or equal to 0.000001865.
     8PASS   Max error for test 1 at offset 1532 is less than or equal to 0.000001865.
     9PASS   Max error for test 2 at offset 3838 is less than or equal to 0.000001865.
     10PASS   Max error for test 3 at offset 5246 is less than or equal to 0.000001865.
     11PASS   Max error for test 4 at offset 5501 is less than or equal to 0.000001865.
     12PASS   Max error for test 5 at offset 7164 is less than or equal to 0.000001865.
     13PASS   Max error for test 6 at offset 8317 is less than or equal to 0.000001865.
     14PASS   Max error for test 7 at offset 9470 is less than or equal to 0.000001865.
     15PASS   Max error for test 8 at offset 11133 is less than or equal to 0.000001865.
     16PASS   Max error for test 9 at offset 13181 is less than or equal to 0.000001865.
     17PASS   Max error for test 10 at offset 13439 is less than or equal to 0.000001865.
     18PASS   Max error for test 11 at offset 15102 is less than or equal to 0.000001865.
     19PASS   Max error for test 12 at offset 16255 is less than or equal to 0.000001865.
     20PASS   Max error for test 13 at offset 17918 is less than or equal to 0.000001865.
     21PASS   Max error for test 14 at offset 19071 is less than or equal to 0.000001865.
     22PASS   Max error for test 15 at offset 20734 is less than or equal to 0.000001865.
     23PASS   Max error for test 16 at offset 22398 is less than or equal to 0.000001865.
     24PASS   Max error for test 17 at offset 23550 is less than or equal to 0.000001865.
     25PASS   Max error for test 18 at offset 24060 is less than or equal to 0.000001865.
     26PASS   Max error for test 19 at offset 26366 is less than or equal to 0.000001865.
     27PASS   Max error for test 20 at offset 26876 is less than or equal to 0.000001865.
     28PASS   Max error for test 21 at offset 28029 is less than or equal to 0.000001865.
     29PASS   Max error for test 22 at offset 30333 is less than or equal to 0.000001865.
     30PASS   Max error for test 23 at offset 30845 is less than or equal to 0.000001865.
     31PASS   Max error for test 24 at offset 31998 is less than or equal to 0.000001865.
     32PASS   Max error for test 25 at offset 33661 is less than or equal to 0.000001865.
     33PASS   Max error for test 26 at offset 34814 is less than or equal to 0.000001865.
     34PASS   Max error for test 27 at offset 35967 is less than or equal to 0.000001865.
     35PASS   Max error for test 28 at offset 37630 is less than or equal to 0.000001865.
     36PASS   Max error for test 29 at offset 38783 is less than or equal to 0.000001865.
     37PASS   Max error for test 30 at offset 40446 is less than or equal to 0.000001865.
     38PASS   Max error for test 31 at offset 41599 is less than or equal to 0.000001865.
     39PASS   Max error for test 32 at offset 43262 is less than or equal to 0.000001865.
     40PASS   Max error for test 33 at offset 44415 is less than or equal to 0.000001865.
     41PASS   Max error for test 34 at offset 46078 is less than or equal to 0.000001865.
     42PASS   Max error for test 35 at offset 47231 is less than or equal to 0.000001865.
     43PASS   Max error for test 36 at offset 48894 is less than or equal to 0.000001865.
     44PASS   Max error for test 37 at offset 50047 is less than or equal to 0.000001865.
     45PASS   Max error for test 38 at offset 50557 is less than or equal to 0.000001865.
     46PASS   Max error for test 39 at offset 52863 is less than or equal to 0.000001865.
     47PASS   Max error for test 40 at offset 53373 is less than or equal to 0.000001865.
     48PASS   Max error for test 41 at offset 55164 is less than or equal to 0.000001865.
     49PASS   Max error for test 42 at offset 56189 is less than or equal to 0.000001865.
     50PASS   Max error for test 43 at offset 57852 is less than or equal to 0.000001865.
     51PASS   Max error for test 44 at offset 58495 is less than or equal to 0.000001865.
     52PASS   Max error for test 45 at offset 60796 is less than or equal to 0.000001865.
     53PASS   Max error for test 46 at offset 61311 is less than or equal to 0.000001865.
     54PASS   Max error for test 47 at offset 63484 is less than or equal to 0.000001865.
     55PASS   Max error for test 48 at offset 64255 is less than or equal to 0.000001865.
     56PASS   Max error for test 49 at offset 65918 is less than or equal to 0.000001865.
     57PASS   Max error for test 50 at offset 66428 is less than or equal to 0.000001865.
     58PASS   Max error for test 51 at offset 68604 is less than or equal to 0.000001865.
     59PASS   Max error for test 52 at offset 68988 is less than or equal to 0.000001865.
     60PASS   Max error for test 53 at offset 71420 is less than or equal to 0.000001865.
     61PASS   Max error for test 54 at offset 72573 is less than or equal to 0.000001865.
     62PASS   Max error for test 55 at offset 73981 is less than or equal to 0.000001865.
     63PASS   Max error for test 56 at offset 75389 is less than or equal to 0.000001865.
     64PASS   Max error for test 57 at offset 76542 is less than or equal to 0.000001865.
     65PASS   Max error for test 58 at offset 76925 is less than or equal to 0.000001865.
     66PASS   Max error for test 59 at offset 79358 is less than or equal to 0.000001865.
     67PASS   Max error for test 60 at offset 80511 is less than or equal to 0.000001865.
     68PASS   Max error for test 61 at offset 81919 is less than or equal to 0.000001865.
     69PASS   Max error for test 62 at offset 83327 is less than or equal to 0.000001865.
     70PASS   Max error for test 63 at offset 84092 is less than or equal to 0.000001865.
     71PASS   Max error for test 64 at offset 85245 is less than or equal to 0.000001865.
     72PASS   Max error for test 65 at offset 86653 is less than or equal to 0.000001865.
     73PASS   Max error for test 66 at offset 87806 is less than or equal to 0.000001865.
     74PASS   Max error for test 67 at offset 88828 is less than or equal to 0.000001865.
     75PASS   Max error for test 68 at offset 90367 is less than or equal to 0.000001865.
     76PASS   Max error for test 69 at offset 92413 is less than or equal to 0.000001865.
     77PASS   Max error for test 70 at offset 93183 is less than or equal to 0.000001865.
     78PASS   Max error for test 71 at offset 95229 is less than or equal to 0.000001865.
     79PASS   Max error for test 72 at offset 95484 is less than or equal to 0.000001865.
     80PASS   Max error for test 73 at offset 96765 is less than or equal to 0.000001865.
     81PASS   Max error for test 74 at offset 98300 is less than or equal to 0.000001865.
     82PASS   Max error for test 75 at offset 100477 is less than or equal to 0.000001865.
     83PASS   Max error for test 76 at offset 100732 is less than or equal to 0.000001865.
     84PASS   Max error for test 77 at offset 102015 is less than or equal to 0.000001865.
     85PASS   Max error for test 78 at offset 103933 is less than or equal to 0.000001865.
     86PASS   Max error for test 79 at offset 105724 is less than or equal to 0.000001865.
     87PASS   Max error for test 80 at offset 106239 is less than or equal to 0.000001865.
     88PASS   Max error for test 81 at offset 108415 is less than or equal to 0.000001865.
     89PASS   Max error for test 82 at offset 109055 is less than or equal to 0.000001865.
     90PASS   Max error for test 83 at offset 111101 is less than or equal to 0.000001865.
     91PASS   Max error for test 84 at offset 111356 is less than or equal to 0.000001865.
     92PASS   Max error for test 85 at offset 112764 is less than or equal to 0.000001865.
     93PASS   Max error for test 86 at offset 114047 is less than or equal to 0.000001865.
     94PASS   Max error for test 87 at offset 116220 is less than or equal to 0.000001865.
    9595PASS   Max error for test 88 at offset 116426 is less than or equal to 0.000001865.
    96 PASS   Max error for test 89 at offset 119064 is less than or equal to 0.000001865.
    97 PASS   Max error for test 90 at offset 120375 is less than or equal to 0.000001865.
     96PASS   Max error for test 89 at offset 119039 is less than or equal to 0.000001865.
     97PASS   Max error for test 90 at offset 120322 is less than or equal to 0.000001865.
    9898PASS   Max error for test 91 at offset 120395 is less than or equal to 0.000001865.
    99 PASS   Max error for test 92 at offset 121718 is less than or equal to 0.000001865.
    100 PASS   Max error for test 93 at offset 124360 is less than or equal to 0.000001865.
    101 PASS   Max error for test 94 at offset 125663 is less than or equal to 0.000001865.
    102 PASS   Max error for test 95 at offset 126993 is less than or equal to 0.000001865.
    103 PASS   Max error for test 96 at offset 128330 is less than or equal to 0.000001865.
    104 PASS   Max error for test 97 at offset 129581 is less than or equal to 0.000001865.
    105 PASS   Max error for test 98 at offset 129709 is less than or equal to 0.000001865.
    106 PASS   Max error for test 99 at offset 131537 is less than or equal to 0.000001865.
     99PASS   Max error for test 92 at offset 123004 is less than or equal to 0.000001865.
     100PASS   Max error for test 93 at offset 124287 is less than or equal to 0.000001865.
     101PASS   Max error for test 94 at offset 125570 is less than or equal to 0.000001865.
     102PASS   Max error for test 95 at offset 126593 is less than or equal to 0.000001865.
     103PASS   Max error for test 96 at offset 128255 is less than or equal to 0.000001865.
     104PASS   Max error for test 97 at offset 128895 is less than or equal to 0.000001865.
     105PASS   Max error for test 98 at offset 130815 is less than or equal to 0.000001865.
     106PASS   Max error for test 99 at offset 132223 is less than or equal to 0.000001865.
    107107PASS   Number of failed tests with an acceptable relative tolerance of 0.000001865 is equal to 0.
    108108PASS < [test] All assertions passed. (total 102 assertions)
  • trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/k-rate-panner-expected.txt

    r267167 r267357  
    2424PASS   k-rate positionX: Output of k-rate PannerNode is identical to the array [expected array].
    2525PASS   k-rate positionX: Output of a-rate PannerNode is identical to the array [expected array].
    26 PASS   k-rate positionX: Difference between a-rate and k-rate PannerNode is not constantly 0 (contains 635 different values).
     26PASS   k-rate positionX: Difference between a-rate and k-rate PannerNode is not constantly 0 (contains 638 different values).
    2727PASS   k-rate positionX k-rate output [0: 127] contains only the constant 0.00005495094956131652.
    2828PASS   k-rate positionX k-rate output [128: 255] contains only the constant 0.001247443608008325.
     
    3939PASS   k-rate positionY: Output of k-rate PannerNode is identical to the array [expected array].
    4040PASS   k-rate positionY: Output of a-rate PannerNode is identical to the array [expected array].
    41 PASS   k-rate positionY: Difference between a-rate and k-rate PannerNode is not constantly 0 (contains 636 different values).
     41PASS   k-rate positionY: Difference between a-rate and k-rate PannerNode is not constantly 0 (contains 638 different values).
    4242PASS   k-rate positionY k-rate output [0: 127] contains only the constant 0.15397992730140686.
    4343PASS   k-rate positionY k-rate output [128: 255] contains only the constant 0.0008113961666822433.
  • trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/retrospective-setValueAtTime-expected.txt

    r267167 r267357  
    66PASS   Test[0:127] contains only the constant 1.
    77PASS   Reference[0:127] contains only the constant 1.
    8 PASS   Test[128:] is identical to the array [expected array].
     8PASS   Test[128:] is identical to the array [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15...].
    99PASS < [test] All assertions passed. (total 3 assertions)
    1010PASS # AUDIT TASK RUNNER FINISHED: 1 tasks ran successfully.
  • trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-biquadfilternode-interface/biquad-automation-expected.txt

    r267167 r267357  
    1212PASS < [automate-freq] All assertions passed. (total 1 assertions)
    1313PASS > [automate-q] 
    14 FAIL X Output of bandpass filter with Q automation does not equal [0,0.013114781118929386,0.047823384404182434,0.09765293449163437,0.15657125413417816,0.21899054944515228,0.27981746196746826,0.3345244824886322,0.379226952791214,0.4107542335987091,0.4267079830169678,0.42550167441368103,0.40637844800949097,0.3694050908088684,0.31544122099876404,0.24608469009399414...] with an element-wise tolerance of {"absoluteThreshold":9.8348e-7,"relativeThreshold":0}.
    15         Index   Actual                  Expected                AbsError                RelError                Test threshold
    16         [252]   5.2270841598510742e-1   5.2270942926406860e-1   1.0132789611816406e-6   1.9385128801067413e-6   9.8348000000000007e-7
    17         Max AbsError of 1.0132789611816406e-6 at index of 252.
    18         Max RelError of 1.9385128801067413e-6 at index of 252.
    19  assert_true: expected true got false
    20 FAIL < [automate-q] 1 out of 1 assertions were failed. assert_true: expected true got false
     14PASS   Output of bandpass filter with Q automation equals [expected array] with an element-wise tolerance of {"absoluteThreshold":9.8348e-7,"relativeThreshold":0}.
     15PASS < [automate-q] All assertions passed. (total 1 assertions)
    2116PASS > [automate-gain] 
    2217PASS   Output of lowshelf filter with gain automation equals [expected array] with an element-wise tolerance of {"absoluteThreshold":0.000027657,"relativeThreshold":0}.
     
    3126PASS   Output of bandpass filter with sinusoidal modulation of bandpass center frequency equals [expected array] with an element-wise tolerance of {"absoluteThreshold":0.000039787,"relativeThreshold":0}.
    3227PASS < [modulation] All assertions passed. (total 1 assertions)
    33 FAIL # AUDIT TASK RUNNER FINISHED: 1 out of 6 tasks were failed. assert_true: expected true got false
     28PASS # AUDIT TASK RUNNER FINISHED: 6 tasks ran successfully.
    3429
  • trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/realtime-conv-expected.txt

    r267251 r267357  
    44PASS Audit report
    55PASS > [test] Test convolver with real-time context
    6 FAIL X SNR is not greater than or equal to 83. Got 77.00623887904952. assert_true: expected true got false
    7 FAIL < [test] 1 out of 1 assertions were failed. assert_true: expected true got false
    8 FAIL # AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed. assert_true: expected true got false
     6PASS   SNR is greater than or equal to 83.
     7PASS < [test] All assertions passed. (total 1 assertions)
     8PASS # AUDIT TASK RUNNER FINISHED: 1 tasks ran successfully.
    99
  • trunk/LayoutTests/webaudio/AudioParam/audioparam-cancel-and-hold-expected.txt

    r267253 r267357  
    1919PASS Audit report
    2020PASS > [linear] Cancel linearRampToValueAtTime
    21 FAIL X linearRampToValueAtTime: linearRampToValue(0, 0.5) up to time 0.25 does not equal [0,0.0020833334419876337,0.004166666883975267,0.0062500000931322575,0.008333333767950535,0.010416666977107525,0.012500000186264515,0.014583333395421505,0.01666666753590107,0.01875000074505806,0.02083333395421505,0.02291666716337204,0.02500000037252903,0.02708333358168602,0.02916666679084301,0.03125...] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}.
    22         Index   Actual                  Expected                AbsError                RelError                Test threshold
    23         [715]   9.9000853300094604e-1   9.9000847339630127e-1   5.9604644775390625e-8   6.0206196590330427e-8   0.0000000000000000e+0
    24         [816]   9.8571431636810303e-1   9.8571425676345825e-1   5.9604644775390625e-8   6.0468481982901817e-8   0.0000000000000000e+0
    25         [879]   9.8303568363189697e-1   9.8303574323654175e-1   5.9604644775390625e-8   6.0633242672487782e-8   0.0000000000000000e+0
    26         [1264]  9.6666663885116577e-1   9.6666669845581055e-1   5.9604644775390625e-8   6.1659975326144279e-8   0.0000000000000000e+0
    27         [1368]  9.6224492788314819e-1   9.6224486827850342e-1   5.9604644775390625e-8   6.1943323098231583e-8   0.0000000000000000e+0
    28         ...and 1140 more errors.
    29         Max AbsError of 5.9604644775390625e-8 at index of 715.
    30         Max RelError of 1.1671811990452458e-7 at index of 11989.
    31         [11989] 5.1067179441452026e-1   5.1067173480987549e-1   5.9604644775390625e-8   1.1671811990452458e-7   0.0000000000000000e+0
    32  assert_true: expected true got false
     21PASS   linearRampToValueAtTime: linearRampToValue(0, 0.5) up to time 0.25 equals [expected array] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}.
    3322PASS   Cancelling linearRampToValueAtTime: linearRampToValue(0, 0.5) at time 0.25 contains only the constant 0.5102040767669678.
    3423PASS   Expected value for cancelling linearRampToValueAtTime: linearRampToValue(0, 0.5) at time 0.25 is 0.5102040767669678 within an error of 0.000083998.
    35 FAIL < [linear] 1 out of 3 assertions were failed. assert_true: expected true got false
     24PASS < [linear] All assertions passed. (total 3 assertions)
    3625PASS > [exponential] Cancel exponentialRampAtTime
    3726PASS   exponentialRampToValue(0.001, 0.5) up to time 0.25 equals [expected array] with an element-wise tolerance of {"absoluteThreshold":5.9605e-8,"relativeThreshold":0}.
     
    6049PASS < [initial setTarget] All assertions passed. (total 3 assertions)
    6150PASS > [post cancel: Linear] LinearRamp after cancelling
    62 FAIL X Post cancellation linearRampToValueAtTime: linearRampToValue(0, 0.5) up to time 0.25 does not equal [0,0.0020833334419876337,0.004166666883975267,0.0062500000931322575,0.008333333767950535,0.010416666977107525,0.012500000186264515,0.014583333395421505,0.01666666753590107,0.01875000074505806,0.02083333395421505,0.02291666716337204,0.02500000037252903,0.02708333358168602,0.02916666679084301,0.03125...] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}.
    63         Index   Actual                  Expected                AbsError                RelError                Test threshold
    64         [715]   9.9000853300094604e-1   9.9000847339630127e-1   5.9604644775390625e-8   6.0206196590330427e-8   0.0000000000000000e+0
    65         [816]   9.8571431636810303e-1   9.8571425676345825e-1   5.9604644775390625e-8   6.0468481982901817e-8   0.0000000000000000e+0
    66         [879]   9.8303568363189697e-1   9.8303574323654175e-1   5.9604644775390625e-8   6.0633242672487782e-8   0.0000000000000000e+0
    67         [1264]  9.6666663885116577e-1   9.6666669845581055e-1   5.9604644775390625e-8   6.1659975326144279e-8   0.0000000000000000e+0
    68         [1368]  9.6224492788314819e-1   9.6224486827850342e-1   5.9604644775390625e-8   6.1943323098231583e-8   0.0000000000000000e+0
    69         ...and 1140 more errors.
    70         Max AbsError of 5.9604644775390625e-8 at index of 715.
    71         Max RelError of 1.1671811990452458e-7 at index of 11989.
    72         [11989] 5.1067179441452026e-1   5.1067173480987549e-1   5.9604644775390625e-8   1.1671811990452458e-7   0.0000000000000000e+0
    73  assert_true: expected true got false
     51PASS   Post cancellation linearRampToValueAtTime: linearRampToValue(0, 0.5) up to time 0.25 equals [expected array] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}.
    7452PASS   Cancelling Post cancellation linearRampToValueAtTime: linearRampToValue(0, 0.5) at time 0.25 contains only the constant 0.5102040767669678.
    7553PASS   Expected value for cancelling Post cancellation linearRampToValueAtTime: linearRampToValue(0, 0.5) at time 0.25 is 0.5102040767669678 within an error of 0.000083998.
    7654PASS   Post linearRamp(2, 0.375) equals [expected array] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}.
    77 FAIL < [post cancel: Linear] 1 out of 4 assertions were failed. assert_true: expected true got false
     55PASS < [post cancel: Linear] All assertions passed. (total 4 assertions)
    7856PASS > [post cancel: Exponential] ExponentialRamp after cancelling
    79 FAIL X Post cancel exponentialRampToValueAtTime: linearRampToValue(0, 0.5) up to time 0.25 does not equal [0,0.0020833334419876337,0.004166666883975267,0.0062500000931322575,0.008333333767950535,0.010416666977107525,0.012500000186264515,0.014583333395421505,0.01666666753590107,0.01875000074505806,0.02083333395421505,0.02291666716337204,0.02500000037252903,0.02708333358168602,0.02916666679084301,0.03125...] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}.
    80         Index   Actual                  Expected                AbsError                RelError                Test threshold
    81         [715]   9.9000853300094604e-1   9.9000847339630127e-1   5.9604644775390625e-8   6.0206196590330427e-8   0.0000000000000000e+0
    82         [816]   9.8571431636810303e-1   9.8571425676345825e-1   5.9604644775390625e-8   6.0468481982901817e-8   0.0000000000000000e+0
    83         [879]   9.8303568363189697e-1   9.8303574323654175e-1   5.9604644775390625e-8   6.0633242672487782e-8   0.0000000000000000e+0
    84         [1264]  9.6666663885116577e-1   9.6666669845581055e-1   5.9604644775390625e-8   6.1659975326144279e-8   0.0000000000000000e+0
    85         [1368]  9.6224492788314819e-1   9.6224486827850342e-1   5.9604644775390625e-8   6.1943323098231583e-8   0.0000000000000000e+0
    86         ...and 1140 more errors.
    87         Max AbsError of 5.9604644775390625e-8 at index of 715.
    88         Max RelError of 1.1671811990452458e-7 at index of 11989.
    89         [11989] 5.1067179441452026e-1   5.1067173480987549e-1   5.9604644775390625e-8   1.1671811990452458e-7   0.0000000000000000e+0
    90  assert_true: expected true got false
     57PASS   Post cancel exponentialRampToValueAtTime: linearRampToValue(0, 0.5) up to time 0.25 equals [expected array] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}.
    9158PASS   Cancelling Post cancel exponentialRampToValueAtTime: linearRampToValue(0, 0.5) at time 0.25 contains only the constant 0.5102040767669678.
    9259PASS   Expected value for cancelling Post cancel exponentialRampToValueAtTime: linearRampToValue(0, 0.5) at time 0.25 is 0.5102040767669678 within an error of 0.000083998.
    9360PASS   Post exponentialRamp(2, 0.375) equals [expected array] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}.
    94 FAIL < [post cancel: Exponential] 1 out of 4 assertions were failed. assert_true: expected true got false
     61PASS < [post cancel: Exponential] All assertions passed. (total 4 assertions)
    9562PASS > [post cancel: ValueCurve] 
    96 FAIL X Post cancel setValueCurveAtTime: linearRampToValue(0, 0.5) up to time 0.25 does not equal [0,0.0020833334419876337,0.004166666883975267,0.0062500000931322575,0.008333333767950535,0.010416666977107525,0.012500000186264515,0.014583333395421505,0.01666666753590107,0.01875000074505806,0.02083333395421505,0.02291666716337204,0.02500000037252903,0.02708333358168602,0.02916666679084301,0.03125...] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}.
    97         Index   Actual                  Expected                AbsError                RelError                Test threshold
    98         [715]   9.9000853300094604e-1   9.9000847339630127e-1   5.9604644775390625e-8   6.0206196590330427e-8   0.0000000000000000e+0
    99         [816]   9.8571431636810303e-1   9.8571425676345825e-1   5.9604644775390625e-8   6.0468481982901817e-8   0.0000000000000000e+0
    100         [879]   9.8303568363189697e-1   9.8303574323654175e-1   5.9604644775390625e-8   6.0633242672487782e-8   0.0000000000000000e+0
    101         [1264]  9.6666663885116577e-1   9.6666669845581055e-1   5.9604644775390625e-8   6.1659975326144279e-8   0.0000000000000000e+0
    102         [1368]  9.6224492788314819e-1   9.6224486827850342e-1   5.9604644775390625e-8   6.1943323098231583e-8   0.0000000000000000e+0
    103         ...and 1140 more errors.
    104         Max AbsError of 5.9604644775390625e-8 at index of 715.
    105         Max RelError of 1.1671811990452458e-7 at index of 11989.
    106         [11989] 5.1067179441452026e-1   5.1067173480987549e-1   5.9604644775390625e-8   1.1671811990452458e-7   0.0000000000000000e+0
    107  assert_true: expected true got false
     63PASS   Post cancel setValueCurveAtTime: linearRampToValue(0, 0.5) up to time 0.25 equals [expected array] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}.
    10864PASS   Cancelling Post cancel setValueCurveAtTime: linearRampToValue(0, 0.5) at time 0.25 contains only the constant 0.5102040767669678.
    10965PASS   Expected value for cancelling Post cancel setValueCurveAtTime: linearRampToValue(0, 0.5) at time 0.25 is 0.5102040767669678 within an error of 0.000083998.
    11066PASS   Post setValueCurve([0.125,2], 0.375, 0.125) equals [expected array] with an element-wise tolerance of {"absoluteThreshold":0.000083998,"relativeThreshold":0}.
    111 FAIL < [post cancel: ValueCurve] 1 out of 4 assertions were failed. assert_true: expected true got false
     67PASS < [post cancel: ValueCurve] All assertions passed. (total 4 assertions)
    11268PASS > [post cancel: setTarget] 
    113 FAIL X Post cancel setTargetAtTime: linearRampToValue(0, 0.5) up to time 0.25 does not equal [0,0.0020833334419876337,0.004166666883975267,0.0062500000931322575,0.008333333767950535,0.010416666977107525,0.012500000186264515,0.014583333395421505,0.01666666753590107,0.01875000074505806,0.02083333395421505,0.02291666716337204,0.02500000037252903,0.02708333358168602,0.02916666679084301,0.03125...] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}.
    114         Index   Actual                  Expected                AbsError                RelError                Test threshold
    115         [715]   9.9000853300094604e-1   9.9000847339630127e-1   5.9604644775390625e-8   6.0206196590330427e-8   0.0000000000000000e+0
    116         [816]   9.8571431636810303e-1   9.8571425676345825e-1   5.9604644775390625e-8   6.0468481982901817e-8   0.0000000000000000e+0
    117         [879]   9.8303568363189697e-1   9.8303574323654175e-1   5.9604644775390625e-8   6.0633242672487782e-8   0.0000000000000000e+0
    118         [1264]  9.6666663885116577e-1   9.6666669845581055e-1   5.9604644775390625e-8   6.1659975326144279e-8   0.0000000000000000e+0
    119         [1368]  9.6224492788314819e-1   9.6224486827850342e-1   5.9604644775390625e-8   6.1943323098231583e-8   0.0000000000000000e+0
    120         ...and 1140 more errors.
    121         Max AbsError of 5.9604644775390625e-8 at index of 715.
    122         Max RelError of 1.1671811990452458e-7 at index of 11989.
    123         [11989] 5.1067179441452026e-1   5.1067173480987549e-1   5.9604644775390625e-8   1.1671811990452458e-7   0.0000000000000000e+0
    124  assert_true: expected true got false
     69PASS   Post cancel setTargetAtTime: linearRampToValue(0, 0.5) up to time 0.25 equals [expected array] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}.
    12570PASS   Cancelling Post cancel setTargetAtTime: linearRampToValue(0, 0.5) at time 0.25 contains only the constant 0.5102040767669678.
    12671PASS   Expected value for cancelling Post cancel setTargetAtTime: linearRampToValue(0, 0.5) at time 0.25 is 0.5102040767669678 within an error of 0.000083998.
    12772PASS   Post setTargetAtTime(0.125, 0.375, 0.1) equals [expected array] with an element-wise tolerance of {"absoluteThreshold":0.000084037,"relativeThreshold":0}.
    128 FAIL < [post cancel: setTarget] 1 out of 4 assertions were failed. assert_true: expected true got false
     73PASS < [post cancel: setTarget] All assertions passed. (total 4 assertions)
    12974PASS > [post cancel: setValue] 
    130 FAIL X Post cancel setValueAtTime: linearRampToValue(0, 0.5) up to time 0.25 does not equal [0,0.0020833334419876337,0.004166666883975267,0.0062500000931322575,0.008333333767950535,0.010416666977107525,0.012500000186264515,0.014583333395421505,0.01666666753590107,0.01875000074505806,0.02083333395421505,0.02291666716337204,0.02500000037252903,0.02708333358168602,0.02916666679084301,0.03125...] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}.
    131         Index   Actual                  Expected                AbsError                RelError                Test threshold
    132         [715]   9.9000853300094604e-1   9.9000847339630127e-1   5.9604644775390625e-8   6.0206196590330427e-8   0.0000000000000000e+0
    133         [816]   9.8571431636810303e-1   9.8571425676345825e-1   5.9604644775390625e-8   6.0468481982901817e-8   0.0000000000000000e+0
    134         [879]   9.8303568363189697e-1   9.8303574323654175e-1   5.9604644775390625e-8   6.0633242672487782e-8   0.0000000000000000e+0
    135         [1264]  9.6666663885116577e-1   9.6666669845581055e-1   5.9604644775390625e-8   6.1659975326144279e-8   0.0000000000000000e+0
    136         [1368]  9.6224492788314819e-1   9.6224486827850342e-1   5.9604644775390625e-8   6.1943323098231583e-8   0.0000000000000000e+0
    137         ...and 1140 more errors.
    138         Max AbsError of 5.9604644775390625e-8 at index of 715.
    139         Max RelError of 1.1671811990452458e-7 at index of 11989.
    140         [11989] 5.1067179441452026e-1   5.1067173480987549e-1   5.9604644775390625e-8   1.1671811990452458e-7   0.0000000000000000e+0
    141  assert_true: expected true got false
     75PASS   Post cancel setValueAtTime: linearRampToValue(0, 0.5) up to time 0.25 equals [expected array] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}.
    14276PASS   Cancelling Post cancel setValueAtTime: linearRampToValue(0, 0.5) at time 0.25 contains only the constant 0.5102040767669678.
    14377PASS   Expected value for cancelling Post cancel setValueAtTime: linearRampToValue(0, 0.5) at time 0.25 is 0.5102040767669678 within an error of 0.000083998.
    14478PASS   Post setValueAtTime(0.125, 0.375) equals [0.125,0.125,0.125,0.125,0.125,0.125,0.125,0.125,0.125,0.125,0.125,0.125,0.125,0.125,0.125,0.125...] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}.
    145 FAIL < [post cancel: setValue] 1 out of 4 assertions were failed. assert_true: expected true got false
     79PASS < [post cancel: setValue] All assertions passed. (total 4 assertions)
    14680PASS > [cancel future setTarget] 
    14781PASS   After cancelling future setTarget event, output contains only the constant 0.5.
     
    15791PASS < [cancel setValueCurve now] All assertions passed. (total 1 assertions)
    15892PASS > [linear, cancel, linear, cancel, linear] Schedules 3 linear ramps, cancelling 2 of them, so that we end up with 2 cancel events next to each other
    159 FAIL X 1st linearRamp: linearRampToValue(0, 0.5) up to time 0.25 does not equal [0,0.0020833334419876337,0.004166666883975267,0.0062500000931322575,0.008333333767950535,0.010416666977107525,0.012500000186264515,0.014583333395421505,0.01666666753590107,0.01875000074505806,0.02083333395421505,0.02291666716337204,0.02500000037252903,0.02708333358168602,0.02916666679084301,0.03125...] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}.
    160         Index   Actual                  Expected                AbsError                RelError                Test threshold
    161         [715]   9.9000853300094604e-1   9.9000847339630127e-1   5.9604644775390625e-8   6.0206196590330427e-8   0.0000000000000000e+0
    162         [816]   9.8571431636810303e-1   9.8571425676345825e-1   5.9604644775390625e-8   6.0468481982901817e-8   0.0000000000000000e+0
    163         [879]   9.8303568363189697e-1   9.8303574323654175e-1   5.9604644775390625e-8   6.0633242672487782e-8   0.0000000000000000e+0
    164         [1264]  9.6666663885116577e-1   9.6666669845581055e-1   5.9604644775390625e-8   6.1659975326144279e-8   0.0000000000000000e+0
    165         [1368]  9.6224492788314819e-1   9.6224486827850342e-1   5.9604644775390625e-8   6.1943323098231583e-8   0.0000000000000000e+0
    166         ...and 1140 more errors.
    167         Max AbsError of 5.9604644775390625e-8 at index of 715.
    168         Max RelError of 1.1671811990452458e-7 at index of 11989.
    169         [11989] 5.1067179441452026e-1   5.1067173480987549e-1   5.9604644775390625e-8   1.1671811990452458e-7   0.0000000000000000e+0
    170  assert_true: expected true got false
     93PASS   1st linearRamp: linearRampToValue(0, 0.5) up to time 0.25 equals [expected array] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}.
    17194PASS   Cancelling 1st linearRamp: linearRampToValue(0, 0.5) at time 0.25 contains only the constant 0.5102040767669678.
    17295PASS   Expected value for cancelling 1st linearRamp: linearRampToValue(0, 0.5) at time 0.25 is 0.5102040767669678 within an error of 0.
     
    17598PASS   Expected value for cancelling 2nd linearRamp(2, 0.5) at time 0.375 is 1.2551020383834839 within an error of 0.
    17699PASS   3rd linearRamp(0, 0.5) equals [expected array] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}.
    177 FAIL < [linear, cancel, linear, cancel, linear] 1 out of 7 assertions were failed. assert_true: expected true got false
    178 FAIL # AUDIT TASK RUNNER FINISHED: 7 out of 16 tasks were failed. assert_true: expected true got false
     100PASS < [linear, cancel, linear, cancel, linear] All assertions passed. (total 7 assertions)
     101PASS # AUDIT TASK RUNNER FINISHED: 16 tasks ran successfully.
    179102
  • trunk/LayoutTests/webaudio/AudioParam/audioparam-negative-exponentialRamp-expected.txt

    r267253 r267357  
    3636FAIL X Exponential ramp from -1 to 1 after the end of the linear ramp: Expected -1 for all values but found 1500 unexpected values:
    3737        Index   Actual
    38         [0]     -0.997999906539917
    39         [1]     -0.997999906539917
    40         [2]     -0.997999906539917
    41         [3]     -0.997999906539917
     38        [0]     -0.9980001449584961
     39        [1]     -0.9980001449584961
     40        [2]     -0.9980001449584961
     41        [3]     -0.9980001449584961
    4242        ...and 1496 more errors. assert_true: expected true got false
    4343PASS   Exponential ramp after end of ramp contains only the constant 1.
  • trunk/LayoutTests/webaudio/AudioParam/audioparam-setTargetAtTime-continuous-expected.txt

    r267253 r267357  
    1414        [1]     8.8028167374432087e-4   1.0004401408450705e+0   9.9955985917132617e-1   9.9912010560371878e-1   1.2676500000000001e-6
    1515        [2]     1.7605633474886417e-3   1.0008802816901408e+0   9.9911971834265212e-1   9.9824098508113712e-1   1.2676500000000001e-6
    16         [3]     2.6408450212329626e-3   1.0013204225352113e+0   9.9867957751397829e-1   9.9736263741176212e-1   1.2676500000000001e-6
     16        [3]     2.6408447884023190e-3   1.0013204225352113e+0   9.9867957774680893e-1   9.9736263764428568e-1   1.2676500000000001e-6
    1717        [4]     3.5211266949772835e-3   1.0017605633802817e+0   9.9823943668530446e-1   9.9648506157689443e-1   1.2676500000000001e-6
    1818        ...and 2267 more errors.
     
    2727FAIL X Delayed linear ramp does not equal [0.44932896411722156,0.45015029411504087,0.4509716241128601,0.4517929541106794,0.45261428410849863,0.45343561410631794,0.4542569441041372,0.45507827410195645,0.45589960409977576,0.45672093409759495,0.4575422640954142,0.4583635940932335,0.45918492409105277,0.460006254088872,0.46082758408669133,0.4616489140845106...] with an element-wise tolerance of {"absoluteThreshold":0.00000107972,"relativeThreshold":0}.
    2828        Index   Actual                  Expected                AbsError                RelError                Test threshold
    29         [0]     3.3802816271781921e-1   4.4932896411722156e-1   1.1130080139940235e-1   2.4770448888838165e-1   1.0797199999999999e-6
    30         [1]     3.3890846371650696e-1   4.5015029411504087e-1   1.1124183039853391e-1   2.4712153219232338e-1   1.0797199999999999e-6
     29        [0]     3.3802819252014160e-1   4.4932896411722156e-1   1.1130077159707996e-1   2.4770442256209341e-1   1.0797199999999999e-6
     30        [1]     3.3890849351882935e-1   4.5015029411504087e-1   1.1124180059621153e-1   2.4712146598705201e-1   1.0797199999999999e-6
    3131        [2]     3.3978873491287231e-1   4.5097162411286013e-1   1.1118288919998781e-1   2.4654076499536740e-1   1.0797199999999999e-6
    32         [3]     3.4066900610923767e-1   4.5179295411067938e-1   1.1112394800144171e-1   2.4596210939185822e-1   1.0797199999999999e-6
     32        [3]     3.4066903591156006e-1   4.5179295411067938e-1   1.1112391819911932e-1   2.4596204342730055e-1   1.0797199999999999e-6
    3333        [4]     3.4154930710792542e-1   4.5261428410849863e-1   1.1106497700057322e-1   2.4538548804162183e-1   1.0797199999999999e-6
    3434        ...and 1883 more errors.
    35         Max AbsError of 1.1130080139940235e-1 at index of 0.
    36         Max RelError of 2.4770448888838165e-1 at index of 0.
     35        Max AbsError of 1.1130077159707996e-1 at index of 0.
     36        Max RelError of 2.4770442256209341e-1 at index of 0.
    3737 assert_true: expected true got false
    3838PASS   Delayed linear ramp: Tail part equals [2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2...] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}.
  • trunk/Source/WebCore/ChangeLog

    r267349 r267357  
     12020-09-21  Chris Dumez  <cdumez@apple.com>
     2
     3        Vectorize linearRampToValueAtTime processing in AudioParamTimeline
     4        https://bugs.webkit.org/show_bug.cgi?id=216788
     5
     6        Reviewed by Darin Adler.
     7
     8        Vectorize linearRampToValueAtTime processing in AudioParamTimeline. This patch is based on
     9        the Blink implementation at [1] but updated to use VectorMath to work on more platforms.
     10
     11        We were failing some tests due to precision issues in our linearRampToValueAtTime implementation.
     12        Those tests are now passing since our implementation matches Blink's more closely.
     13
     14        [1] https://github.com/chromium/chromium/blob/master/third_party/blink/renderer/modules/webaudio/audio_param_timeline.cc
     15
     16        No new tests, rebaselined existing tests.
     17
     18        * Modules/webaudio/AudioParamTimeline.cpp:
     19        (WebCore::AudioParamTimeline::valuesForTimeRangeImpl):
     20        (WebCore::AudioParamTimeline::processLinearRamp):
     21        * Modules/webaudio/AudioParamTimeline.h:
     22
    1232020-09-21  Chris Dumez  <cdumez@apple.com>
    224
  • trunk/Source/WebCore/Modules/webaudio/AudioParamTimeline.cpp

    r267218 r267357  
    418418
    419419        // First handle linear and exponential ramps which require looking ahead to the next event.
    420         if (nextEventType == ParamEvent::LinearRampToValue) {
    421             for (; writeIndex < fillToFrame; ++writeIndex) {
    422                 // Since deltaTime is a double, 1/deltaTime can easily overflow a float. Thus, if deltaTime
    423                 // is close enough to zero (less than float min), treat it as zero.
    424                 float k = deltaTime.value() <= std::numeric_limits<float>::min() ? 0 : 1 / deltaTime.value();
    425                 float x = (currentFrame * samplingPeriod - time1.value()) * k;
    426                 float valueDelta = value2 - value1;
    427                 value = value1 + valueDelta * x;
    428                 values[writeIndex] = value;
    429                 ++currentFrame;
    430             }
    431         } else if (nextEventType == ParamEvent::ExponentialRampToValue) {
     420        if (nextEventType == ParamEvent::LinearRampToValue)
     421            processLinearRamp(values, writeIndex, fillToFrame, value, value1, value2, deltaTime, time1, samplingPeriod, currentFrame);
     422        else if (nextEventType == ParamEvent::ExponentialRampToValue) {
    432423            if (value1 <= 0 || value2 <= 0) {
    433424                // Handle negative values error case by propagating previous value.
     
    629620
    630621    return value;
     622}
     623
     624void AudioParamTimeline::processLinearRamp(float* values, unsigned& writeIndex, unsigned fillToFrame, float& value, float value1, float value2, Seconds deltaTime, Seconds time1, double samplingPeriod, size_t& currentFrame)
     625{
     626    float valueDelta = value2 - value1;
     627    // Since deltaTime is a double, 1/deltaTime can easily overflow a float. Thus, if deltaTime
     628    // is close enough to zero (less than float min), treat it as zero.
     629    float k = deltaTime.value() <= std::numeric_limits<float>::min() ? 0 : 1 / deltaTime.value();
     630
     631    unsigned fillToFrameTrunc = writeIndex + ((fillToFrame - writeIndex) / 4) * 4;
     632    if (fillToFrameTrunc > writeIndex) {
     633        // Minimize in-loop operations. Calculate starting value and increment.
     634        // Next step: value += inc.
     635        //  value = value1 + (currentFrame/sampleRate - time1) * k * (value2 - value1);
     636        //  inc = 4 / sampleRate * k * (value2 - value1);
     637        // Resolve recursion by expanding constants to achieve a 4-step loop unrolling.
     638        //  value = value1 + ((currentFrame/sampleRate - time1) + i * sampleFrameTimeIncr) * k * (value2 - value1), i in 0..3
     639        values[writeIndex] = 0;
     640        values[writeIndex + 1] = 1;
     641        values[writeIndex + 2] = 2;
     642        values[writeIndex + 3] = 3;
     643        float scalar = samplingPeriod;
     644        VectorMath::vsmul(values + writeIndex, 1, &scalar, values + writeIndex, 1, 4);
     645        scalar = currentFrame * samplingPeriod - time1.value();
     646        VectorMath::vsadd(values + writeIndex, 1, &scalar, values + writeIndex, 1, 4);
     647        scalar = k * valueDelta;
     648        VectorMath::vsmul(values + writeIndex, 1, &scalar, values + writeIndex, 1, 4);
     649        VectorMath::vsadd(values + writeIndex, 1, &value1, values + writeIndex, 1, 4);
     650
     651        float inc = 4 * samplingPeriod * k * valueDelta;
     652
     653        // Truncate loop steps to multiple of 4.
     654        unsigned fillToFrameTrunc = writeIndex + ((fillToFrame - writeIndex) / 4) * 4;
     655        // Compute final frame.
     656        currentFrame += fillToFrameTrunc - writeIndex;
     657
     658        // Process 4 loop steps.
     659        writeIndex += 4;
     660        for (; writeIndex < fillToFrameTrunc; writeIndex += 4)
     661            VectorMath::vsadd(values + writeIndex - 4, 1, &inc, values + writeIndex, 1, 4);
     662    }
     663    // Update |value| with the last value computed so that the .value attribute of the AudioParam gets
     664    // the correct linear ramp value, in case the following loop doesn't execute.
     665    if (writeIndex >= 1)
     666        value = values[writeIndex - 1];
     667
     668    // Serially process remaining values.
     669    for (; writeIndex < fillToFrame; ++writeIndex) {
     670        float x = (currentFrame * samplingPeriod - time1.value()) * k;
     671        value = value1 + valueDelta * x;
     672        values[writeIndex] = value;
     673        ++currentFrame;
     674    }
    631675}
    632676
  • trunk/Source/WebCore/Modules/webaudio/AudioParamTimeline.h

    r267218 r267357  
    163163    void handleCancelValues(ParamEvent&, ParamEvent* nextEvent, float& value2, Seconds& time2, ParamEvent::Type& nextEventType);
    164164    bool isEventCurrent(const ParamEvent&, const ParamEvent* nextEvent, size_t currentFrame, double sampleRate) const;
     165    void processLinearRamp(float* values, unsigned& writeIndex, unsigned fillToFrame, float& value, float value1, float value2, Seconds deltaTime, Seconds time1, double samplingPeriod, size_t& currentFrame);
    165166    void processSetTarget(float* values, unsigned& writeIndex, unsigned fillToFrame, float& value, float target, float discreteTimeConstant);
    166167
Note: See TracChangeset for help on using the changeset viewer.