mirror of
https://github.com/Tonejs/Tone.js
synced 2024-12-27 03:53:07 +00:00
correcting example
This commit is contained in:
parent
a9f99e8fb3
commit
f05775b964
1 changed files with 3 additions and 2 deletions
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue