MediaRecorder works the same way (but for MediaStreamSources, not BufferSources).
the idea is that audio buffers are processed in chunks- an event fires for each chunk that is processed. the act of "recording" is just reassembling these chunks into a single ArrayBuffer.
edit: seems like Recorderjs works exactly this way (but implements features more than just recording, like exporting as WAV).
capturing the chunks: https://github.com/mattdiamond/Recorderjs/blob/master/src/re...
reassembling the chunks: https://github.com/mattdiamond/Recorderjs/blob/master/src/re...