message: test takes sample rate
diff: @@ -7,10 +7,10 @@ type ReturnFunction = (time: Seconds) => void;
  export async function Offline(
  callback: (context: OfflineContext) => void | ReturnFunction | Promise<void | ReturnFunction> | void,
  - duration = 0.1, channels = 1,
  + duration = 0.1, channels = 1, sampleRate: number = 44100,
  ) {
  const originalContext = Context.getGlobal();
  - const offline = new OfflineContext(channels, duration, 44100);
  + const offline = new OfflineContext(channels, duration + 1 / sampleRate, sampleRate);
  Context.setGlobal(offline);
  let retFunction = callback(offline);
  if (retFunction instanceof Promise) {
  