Load and play sound files.
Examples
Methods
start
Start the soundfile.
play
Start the soundfile.
stop
Stop the soundfile.
pause
Pause the soundfile.
loop
Loop the soundfile.
setLoop
Set a loop region, and optionally a playback rate, and amplitude for the soundfile.
amp
Adjust the amplitude of the soundfile.
setPath
Change the path for the soundfile.
rate
Set the playback rate of the soundfile.
duration
Returns the duration of a sound file in seconds.
sampleRate
Gets the number of channels in the sound file.
jump
Move the playhead of a soundfile that is currently playing to a new position.
isPlaying
Return the playback state of the soundfile.
isLooping
Return the playback state of the soundfile.
onended
Define a function to call when the soundfile is done playing.
frames
Return the number of samples in a sound file.
channels
Gets the number of channels in the sound file.
Notice any errors or typos? Please let us know. Please feel free to edit src/SoundFile.js and open a pull request!