From f05775b96483b129f213bd9274393660220dfeea Mon Sep 17 00:00:00 2001 From: Yotam Mann Date: Sat, 18 Jul 2020 17:47:07 -0700 Subject: [PATCH] correcting example --- Tone/core/context/OfflineContext.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Tone/core/context/OfflineContext.ts b/Tone/core/context/OfflineContext.ts index 498df326..971d17bb 100644 --- a/Tone/core/context/OfflineContext.ts +++ b/Tone/core/context/OfflineContext.ts @@ -9,7 +9,7 @@ import { ToneAudioBuffer } from "./ToneAudioBuffer"; * @category Core * @example * // generate a single channel, 0.5 second buffer - * const context = new Tone.OfflineContext(1, 0.5); + * const context = new Tone.OfflineContext(1, 0.5, 44100); * const osc = new Tone.Oscillator({ context }); * context.render().then(buffer => { * console.log(buffer.numberOfChannels, buffer.duration); @@ -43,7 +43,8 @@ export class OfflineContext extends Context { */ constructor( channels: number, - duration: Seconds, sampleRate: number, + duration: Seconds, + sampleRate: number, ); constructor(context: OfflineAudioContext); constructor() {