;
  const ratio = offset1 / offset0;
  for (let i = 0; i < bufferSize; ++i) {
    // Math.pow() uses double precision, while `output` has single precision,
    // but `tolerance` is more than enough to accommodate differences.
    const expected = offset0 * Math.pow(offset1/offset0, i/rampEndSample);
    assert_approx_equals(
      output[i],
      expected,
      relativeTolerance * expected,
      "scheduled value at " + i);
  }
});
</script>
