The most simple example just stops the audio buffer playing immediately — you don't need to specify any parameters in this case:
The MediaRecorder.stop() method (part of the MediaRecorder API) is used to stop media capture.
The MediaStreamTrack.stop() method stops playing the source associated with the track. Both the source and the track are deassociated. The track state is set to ended.
The following example shows basic usage of an AudioContext to create an oscillator node. For an applied example, check out our Violent Theremin demo (see app.js for relevant code).