 bufferSize, sampleRate);

  const source = new ConstantSourceNode(context);
  source.start();
  // Explicit event to work around
  // https://bugzilla.mozilla.org/show_bug.cgi?id=1265393
  source.offset.setValueAtTime(offset0, 0.);
  source.offset.exponentialRampToValueAtTime(offset1, rampEndSample/sampleRate);
  source.connect(context.destination);

  const buffer = await context.startRendering();
  assert_equals(buffer.length, bufferSize, "output buffer length");
  const output = buffer.getChannelData(0)