Changeset 267367 in webkit
- Timestamp:
- Sep 21, 2020, 2:17:46 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/webaudio/AudioParam/audioparam-negative-exponentialRamp-expected.txt (modified) (1 diff)
-
LayoutTests/webaudio/AudioParam/audioparam-setTargetAtTime-continuous-expected.txt (modified) (2 diffs)
-
LayoutTests/webaudio/AudioParam/audioparam-setValueCurve-end-expected.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/Modules/webaudio/AudioParamTimeline.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r267366 r267367 1 2020-09-21 Chris Dumez <cdumez@apple.com> 2 3 AudioParam.exponentialRampToValueAtTime() does not properly deal with negative values 4 https://bugs.webkit.org/show_bug.cgi?id=216790 5 6 Reviewed by Eric Carlson. 7 8 Rebaseline test that is now passing. 9 10 * webaudio/AudioParam/audioparam-negative-exponentialRamp-expected.txt: 11 1 12 2020-09-21 Youenn Fablet <youenn@apple.com> 2 13 -
trunk/LayoutTests/webaudio/AudioParam/audioparam-negative-exponentialRamp-expected.txt
r267357 r267367 7 7 PASS Audit report 8 8 PASS > [both negative values] 9 FAIL X Negative exponential ramp from -1 to -2 expected to be equal to the array [-1,-1.0001155138015747,-1.0002310276031494,-1.0003465414047241,-1.0004620552062988,-1.0005775690078735,-1.0006932020187378,-1.000808835029602,-1.0009244680404663,-1.0010401010513306,-1.0011557340621948,-1.001271367073059,-1.0013870000839233,-1.0015026330947876,-1.0016182661056519,-1.0017340183258057...] but differs in 6000 places: 10 Index Actual Expected 11 [0] 1.0000000000000000e+0 -1.0000000000000000e+0 12 [1] 1.0000000000000000e+0 -1.0001155138015747e+0 13 [2] 1.0000000000000000e+0 -1.0002310276031494e+0 14 [3] 1.0000000000000000e+0 -1.0003465414047241e+0 15 ...and 5996 more errors. assert_true: expected true got false 16 FAIL < [both negative values] 1 out of 1 assertions were failed. assert_true: expected true got false 9 PASS Negative exponential ramp from -1 to -2 is identical to the array [expected array]. 10 PASS < [both negative values] All assertions passed. (total 1 assertions) 17 11 PASS > [negative-end] 18 FAIL X Exponential ramp from 2 to -1: Expected 2 for all values but found 6000 unexpected values: 19 Index Actual 20 [0] 1 21 [1] 1 22 [2] 1 23 [3] 1 24 ...and 5996 more errors. assert_true: expected true got false 25 FAIL < [negative-end] 1 out of 1 assertions were failed. assert_true: expected true got false 12 PASS Exponential ramp from 2 to -1 contains only the constant 2. 13 PASS < [negative-end] All assertions passed. (total 1 assertions) 26 14 PASS > [positive-end] 27 FAIL X Exponential ramp from -1 to 1: Expected -1 for all values but found 6000 unexpected values: 28 Index Actual 29 [0] 1 30 [1] 1 31 [2] 1 32 [3] 1 33 ...and 5996 more errors. assert_true: expected true got false 34 FAIL < [positive-end] 1 out of 1 assertions were failed. assert_true: expected true got false 15 PASS Exponential ramp from -1 to 1 contains only the constant -1. 16 PASS < [positive-end] All assertions passed. (total 1 assertions) 35 17 PASS > [propagate] 36 FAIL X Exponential ramp from -1 to 1 after the end of the linear ramp: Expected -1 for all values but found 1500 unexpected values: 37 Index Actual 38 [0] -0.9980001449584961 39 [1] -0.9980001449584961 40 [2] -0.9980001449584961 41 [3] -0.9980001449584961 42 ...and 1496 more errors. assert_true: expected true got false 18 PASS Exponential ramp from -1 to 1 after the end of the linear ramp contains only the constant -1. 43 19 PASS Exponential ramp after end of ramp contains only the constant 1. 44 FAIL < [propagate] 1 out of 2 assertions were failed. assert_true: expected true got false 45 FAIL # AUDIT TASK RUNNER FINISHED: 4 out of 4 tasks were failed. assert_true: expected true got false 20 PASS < [propagate] All assertions passed. (total 2 assertions) 21 PASS # AUDIT TASK RUNNER FINISHED: 4 tasks ran successfully. 46 22 -
trunk/LayoutTests/webaudio/AudioParam/audioparam-setTargetAtTime-continuous-expected.txt
r267357 r267367 43 43 FAIL X Exponential ramp does not equal [1,1.00030517578125,1.0006103515625,1.0009156465530396,1.0012210607528687,1.0015265941619873,1.001832127571106,1.0021378993988037,1.0024436712265015,1.0027495622634888,1.003055453300476,1.0033615827560425,1.0036677122116089,1.0039739608764648,1.0042803287506104,1.0045866966247559...] with an element-wise tolerance of {"absoluteThreshold":0.0000114441,"relativeThreshold":0}. 44 44 Index Actual Expected AbsError RelError Test threshold 45 [1] 1.0000000000000000e+0 1.0003051757812500e+0 3.0517578125000000e-4 3.0508267740557692e-4 1.1444099999999999e-5 46 [2] 1.0000000000000000e+0 1.0006103515625000e+0 6.1035156250000000e-4 6.0997926070513605e-4 1.1444099999999999e-5 47 [3] 1.0000000000000000e+0 1.0009156465530396e+0 9.1564655303955078e-4 9.1480891141312545e-4 1.1444099999999999e-5 48 [4] 1.0000000000000000e+0 1.0012210607528687e+0 1.2210607528686523e-3 1.2195715818747112e-3 1.1444099999999999e-5 49 [5] 1.0000000000000000e+0 1.0015265941619873e+0 1.5265941619873047e-3 1.5242672245410118e-3 1.1444099999999999e-5 50 ...and 2266 more errors. 51 Max AbsError of 9.9938988685607910e-1 at index of 2271. 52 [2271] 1.0000000000000000e+0 1.9993898868560791e+0 9.9938988685607910e-1 4.9984742517006520e-1 1.1444099999999999e-5 53 Max RelError of 4.9984742517006520e-1 at index of 2271. 54 [2271] 1.0000000000000000e+0 1.9993898868560791e+0 9.9938988685607910e-1 4.9984742517006520e-1 1.1444099999999999e-5 45 [0] 0.0000000000000000e+0 1.0000000000000000e+0 1.0000000000000000e+0 1.0000000000000000e+0 1.1444099999999999e-5 46 [1] 0.0000000000000000e+0 1.0003051757812500e+0 1.0003051757812500e+0 1.0000000000000000e+0 1.1444099999999999e-5 47 [2] 0.0000000000000000e+0 1.0006103515625000e+0 1.0006103515625000e+0 1.0000000000000000e+0 1.1444099999999999e-5 48 [3] 0.0000000000000000e+0 1.0009156465530396e+0 1.0009156465530396e+0 1.0000000000000000e+0 1.1444099999999999e-5 49 [4] 0.0000000000000000e+0 1.0012210607528687e+0 1.0012210607528687e+0 1.0000000000000000e+0 1.1444099999999999e-5 50 ...and 2267 more errors. 51 Max AbsError of 1.9993898868560791e+0 at index of 2271. 52 [2271] 0.0000000000000000e+0 1.9993898868560791e+0 1.9993898868560791e+0 1.0000000000000000e+0 1.1444099999999999e-5 53 Max RelError of 1.0000000000000000e+0 at index of 0. 55 54 assert_true: expected true got false 56 55 PASS Exponential 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}. … … 61 60 FAIL X Delayed exponential ramp does not equal [0.4493289589881897,0.4496844708919525,0.45004022121429443,0.4503962993621826,0.4507526457309723,0.45110926032066345,0.4514661729335785,0.451823353767395,0.4521808326244354,0.4525385797023773,0.4528966248035431,0.45325493812561035,0.4536135494709015,0.4539724290370941,0.4543316066265106,0.4546910524368286...] with an element-wise tolerance of {"absoluteThreshold":0.00000429154,"relativeThreshold":0}. 62 61 Index Actual Expected AbsError RelError Test threshold 63 [0] 4.5026594400405884e-1 4.4932895898818970e-1 9.3698501586914063e-4 2.0852985260043492e-34.2915399999999997e-664 [1] 4.5026594400405884e-1 4.4968447089195251e-1 5.8147311210632324e-4 1.2930691401305608e-34.2915399999999997e-665 [2] 4.5026594400405884e-1 4.5004022121429443e-1 2.2572278976440430e-4 5.0156136968238332e-44.2915399999999997e-666 [3] 4.5026594400405884e-1 4.5039629936218262e-1 1.3035535812377930e-4 2.8942368822385700e-44.2915399999999997e-667 [4] 4.5026594400405884e-1 4.5075264573097229e-1 4.8670172691345215e-4 1.0797534557432987e-34.2915399999999997e-662 [0] 0.0000000000000000e+0 4.4932895898818970e-1 4.4932895898818970e-1 1.0000000000000000e+0 4.2915399999999997e-6 63 [1] 0.0000000000000000e+0 4.4968447089195251e-1 4.4968447089195251e-1 1.0000000000000000e+0 4.2915399999999997e-6 64 [2] 0.0000000000000000e+0 4.5004022121429443e-1 4.5004022121429443e-1 1.0000000000000000e+0 4.2915399999999997e-6 65 [3] 0.0000000000000000e+0 4.5039629936218262e-1 4.5039629936218262e-1 1.0000000000000000e+0 4.2915399999999997e-6 66 [4] 0.0000000000000000e+0 4.5075264573097229e-1 4.5075264573097229e-1 1.0000000000000000e+0 4.2915399999999997e-6 68 67 ...and 1883 more errors. 69 Max AbsError of 1.5481528639793396e+0 at index of 1887. 70 [1887] 4.5026594400405884e-1 1.9984188079833984e+0 1.5481528639793396e+0 7.7468889794005613e-1 4.2915399999999997e-6 71 Max RelError of 7.7468889794005613e-1 at index of 1887. 72 [1887] 4.5026594400405884e-1 1.9984188079833984e+0 1.5481528639793396e+0 7.7468889794005613e-1 4.2915399999999997e-6 68 Max AbsError of 1.9984188079833984e+0 at index of 1887. 69 [1887] 0.0000000000000000e+0 1.9984188079833984e+0 1.9984188079833984e+0 1.0000000000000000e+0 4.2915399999999997e-6 70 Max RelError of 1.0000000000000000e+0 at index of 0. 73 71 assert_true: expected true got false 74 72 PASS Delayed exponential 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/LayoutTests/webaudio/AudioParam/audioparam-setValueCurve-end-expected.txt
r267253 r267367 15 15 FAIL < [1: linearRampToValueAtTime] 1 out of 1 assertions were failed. assert_true: expected true got false 16 16 PASS > [2: exponentialRampToValueAtTime] 17 FAIL X setValueCurve(..., 0, 0.01).exponentialRampToValueAtTime(2, 0.02): value at time 0.01 is not close to 0.3 within a relative error of 3.9737e-8 (RelErr= 2.3333333333333335). Got 1. assert_true: expected true got false17 FAIL X setValueCurve(..., 0, 0.01).exponentialRampToValueAtTime(2, 0.02): value at time 0.01 is not close to 0.3 within a relative error of 3.9737e-8 (RelErr=1). Got 0. assert_true: expected true got false 18 18 FAIL < [2: exponentialRampToValueAtTime] 1 out of 1 assertions were failed. assert_true: expected true got false 19 19 PASS > [3: exponentialRampToValueAtTime] 20 FAIL X setValueCurve(..., 0, 0.0100390625).exponentialRampToValueAtTime(2, 0.02): value at time 0.010078125 is not close to 0.30224022883150364 within a relative error of 7.8294e-8 (RelErr= 2.308626399159761). Got 1. assert_true: expected true got false20 FAIL X setValueCurve(..., 0, 0.0100390625).exponentialRampToValueAtTime(2, 0.02): value at time 0.010078125 is not close to 0.30224022883150364 within a relative error of 7.8294e-8 (RelErr=1). Got 0. assert_true: expected true got false 21 21 FAIL < [3: exponentialRampToValueAtTime] 1 out of 1 assertions were failed. assert_true: expected true got false 22 22 PASS > [4: setTargetAtTime] -
trunk/Source/WebCore/ChangeLog
r267366 r267367 1 2020-09-21 Chris Dumez <cdumez@apple.com> 2 3 AudioParam.exponentialRampToValueAtTime() does not properly deal with negative values 4 https://bugs.webkit.org/show_bug.cgi?id=216790 5 6 Reviewed by Eric Carlson. 7 8 AudioParam.exponentialRampToValueAtTime() does not properly deal with negative values. 9 The specification [1] says: 10 "If V0 and V1 have opposite signs or if V0 is zero, then v(t) = V0 for T0 <= t < T1." 11 12 Our implementation did not match the specification and would just special-case if either 13 V0 or V1 was negative. 14 15 [1] https://www.w3.org/TR/webaudio/#dom-audioparam-exponentialramptovalueattime 16 17 No new tests, rebaselined existing test. 18 19 * Modules/webaudio/AudioParamTimeline.cpp: 20 (WebCore::AudioParamTimeline::valuesForTimeRangeImpl): 21 1 22 2020-09-21 Youenn Fablet <youenn@apple.com> 2 23 -
trunk/Source/WebCore/Modules/webaudio/AudioParamTimeline.cpp
r267357 r267367 421 421 processLinearRamp(values, writeIndex, fillToFrame, value, value1, value2, deltaTime, time1, samplingPeriod, currentFrame); 422 422 else if (nextEventType == ParamEvent::ExponentialRampToValue) { 423 if (value1 <= 0 || value2 <= 0) { 424 // Handle negative values error case by propagating previous value. 423 if (!value1 || value1 * value2 < 0) { 424 // Per the specification: 425 // If value1 and value2 have opposite signs or if value1 is zero, then v(t) = value1 for T0 <= t < T1. 426 value = value1; 425 427 for (; writeIndex < fillToFrame; ++writeIndex) 426 428 values[writeIndex] = value;
Note:
See TracChangeset
for help on using the changeset viewer.