src/buffer-queue.js
/**
 * Constructor for BufferQueue class.
 * @class
 * @param {number} numChannels - channel count to validate against
 * @param {number} bufferSize - desired size of pre-chunked output buffers, in samples
 *
 * @classdesc
 * Abstraction around a queue of audio buffers.
 *
 * Stuff input buffers of any length in via {@link BufferQueue#appendBuffer},
 * check how much is queued with {@link BufferQueue#sampleCount}, and pull out
 * data in fixed-size chunks from the start with {@link BufferQueue#shift}.
 */
Constructor for BufferQueue class.
@class
@param {number} numChannels - channel count to validate against
@param {number} bufferSize - desired size of pre-chunked output buffers, in samples

@classdesc
Abstraction around a queue of audio buffers.

Stuff input buffers of any length in via  BufferQueue#appendBuffer,
check how much is queued with  BufferQueue#sampleCount, and pull out
data in fixed-size chunks from the start with  BufferQueue#shift.
Constructor for BufferQueue class . @class @param { number } numChannels - channel count to validate against @param { number } bufferSize - desired size of pre - chunked output buffers in samples @classdesc Abstraction around a queue of audio buffers . Stuff input buffers of any length in via BufferQueue#appendBuffer check how much is queued with BufferQueue#sampleCount and pull out data in fixed - size chunks from the start with BufferQueue#shift .
function BufferQueue(numChannels, bufferSize) {
  if (numChannels < 1 || numChannels !== Math.round(numChannels)) {
    throw 'Invalid channel count for BufferQueue';
  }
  this.channels = numChannels;
  this.bufferSize = bufferSize;
  this.flush();
}
function BufferQueue ( numChannels , bufferSize ) { if ( numChannels < 1 || numChannels !== Math . round ( numChannels ) ) { throw 'Invalid channel count for BufferQueue' ; } this . channels = numChannels ; this . bufferSize = bufferSize ; this . flush ( ) ; }
Constructor for BufferQueue class.
Constructor for BufferQueue class .