mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-24 02:35:41 +00:00
Bug 1119266 - Properly wrap the table index in ComputeCustom on ARM. r=karlt
On ARM, casting a negative float to an unsigned integer yields zero, whereas on x86, it wraps. When the OscillatorNode had a negative frequency, the code would just interpolate between the first and second value of the wave table, instead of interpolating backward.
This commit is contained in:
parent
b85d910517
commit
96c8cd7b84
@ -258,8 +258,8 @@ public:
|
||||
}
|
||||
// Bilinear interpolation between adjacent samples in each table.
|
||||
float floorPhase = floorf(mPhase);
|
||||
uint32_t j1 = floorPhase;
|
||||
j1 &= indexMask;
|
||||
int j1Signed = static_cast<int>(floorPhase);
|
||||
uint32_t j1 = j1Signed & indexMask;
|
||||
uint32_t j2 = j1 + 1;
|
||||
j2 &= indexMask;
|
||||
|
||||
|
@ -127,7 +127,6 @@ skip-if = (toolkit == 'gonk' && !debug) || android_version == '10' # Android: bu
|
||||
[test_oscillatorNode.html]
|
||||
[test_oscillatorNode2.html]
|
||||
[test_oscillatorNodeNegativeFrequency.html]
|
||||
skip-if = (toolkit == 'gonk') || (toolkit == 'android')
|
||||
[test_oscillatorNodePassThrough.html]
|
||||
[test_oscillatorNodeStart.html]
|
||||
[test_oscillatorTypeChange.html]
|
||||
|
Loading…
Reference in New Issue
Block a user