cwilso / AudioRecorder

Simple live audio file recorder, based on RecorderJS
MIT License
421 stars 168 forks source link

How to playback? #16

Closed sonnyk22 closed 8 years ago

sonnyk22 commented 8 years ago

AudioRecorder is a great app. It allows to record and save, but how can I get it to playback the buffered audio recording prior to saving it? In addition to the Recorder.js, is there another JS library that I'll need to use to play back the buffered audio?

cwilso commented 8 years ago

Not at all - in code, you'd just need to create an AudioBufferSourceNode (via AudioContext.createBufferSource()), set its .buffer to the Audio buffer you've recorded, .connect() it to the AudioContext.destination, and call BufferSourceNode.start(0).

sonnyk22 commented 8 years ago

Thanks