index.js
function consume (len) {
		count -= len
		if (count < 0) {
			count = 0;
			console.warn('Not enough samples fed for the next data frame. Expected frame is ' + samplesPerFrame + ' samples ' + channels + ' channels')
		}

		if (!callbackMarks.length) return

		for (let i = 0, l = callbackMarks.length; i < l; i++) {
			callbackMarks[i] = Math.max(callbackMarks[i] - len, 0)
		}

		while (callbackMarks[0] <= 0) {
			callbackMarks.shift()
			let cb = callbackQueue.shift()
			cb()
		}
	}
function consume (len) {
		count -= len
		if (count < 0) {
			count = 0;
			console.warn('Not enough samples fed for the next data frame. Expected frame is ' + samplesPerFrame + ' samples ' + channels + ' channels')
		}

		if (!callbackMarks.length) return

		for (let i = 0, l = callbackMarks.length; i < l; i++) {
			callbackMarks[i] = Math.max(callbackMarks[i] - len, 0)
		}

		while (callbackMarks[0] <= 0) {
			callbackMarks.shift()
			let cb = callbackQueue.shift()
			cb()
		}
	}
function consume ( len ) { count -= len if ( count < 0 ) { count = 0 ; console . warn ( 'Not enough samples fed for the next data frame. Expected frame is ' + samplesPerFrame + ' samples ' + channels + ' channels' ) } if ( ! callbackMarks . length ) return for ( let i = 0 , l = callbackMarks . length ; i < l ; i ++ ) { callbackMarks [ i ] = Math . max ( callbackMarks [ i ] - len , 0 ) } while ( callbackMarks [ 0 ] <= 0 ) { callbackMarks . shift ( ) let cb = callbackQueue . shift ( ) cb ( ) } }
walk over callback stack, invoke according callbacks
walk over callback stack invoke according callbacks