MCPcopy Create free account
hub / github.com/Code-Bullet/Jump-King / _createCounterBuffer

Function _createCounterBuffer

libraries/p5.sound.js:1828–1836  ·  view source on GitHub ↗
(buffer)

Source from the content-addressed store, hash-verified

1826 return bufferSourceNode;
1827 };
1828 var _createCounterBuffer = function (buffer) {
1829 var array = new Float32Array(buffer.length);
1830 var audioBuf = ac.createBuffer(1, buffer.length, 44100);
1831 for (var index = 0; index < buffer.length; index++) {
1832 array[index] = index;
1833 }
1834 audioBuf.getChannelData(0).set(array);
1835 return audioBuf;
1836 };
1837 /**
1838 * processPeaks returns an array of timestamps where it thinks there is a beat.
1839 *

Callers 1

p5.sound.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected