This page is Ready to Use

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

AudioBufferSourceNode

Summary

This interface represents an audio source from an in-memory audio asset in an AudioBuffer. It generally will be used for short audio assets which require a high degree of scheduling flexibility (can playback in rhythmically perfect ways).

Properties

buffer
Represents the audio asset to be played.
loop
Indicates if the audio data should play in a loop. The default value is false.
loopEnd
An optional value in seconds where looping should end if the loop attribute is true. Its default value is 0, and it may usefully be set to any value between 0 and the duration of the buffer.
loopStart
An optional value in seconds where looping should begin if the loop attribute is true. Its default value is 0, and it may usefully be set to any value between 0 and the duration of the buffer.
playbackRate
The speed at which to render the audio stream. The default playbackRate value is 1. This parameter is a-rate.
playbackState
The playback state, initialized to UNSCHEDULED_STATE, progressing through SCHEDULED_STATE, PLAYING_STATE, and FINISHED_STATE.

Methods

start
Schedules a sound to playback at an exact time, with options.
stop
Schedules a sound to stop playback at an exact time, with options.

Events

No events.

Related specifications

W3C Web Audio API
W3C Editor’s Draft