Commit 351db365 authored by Mick Grierson's avatar Mick Grierson

added buffersize method

parent 05943e12
......@@ -33527,10 +33527,6 @@ maximJs.maxiAudio = (function() {
this.outputIsArray(isArray, numChannels_);
this.resetAudio();
});
this.setBufferSize = (function(newBufferSize) {
bufferSize = newBufferSize;
this.resetAudio();
});
this.outputIsArray = (function(isArray) {
if (isArray) {
maximJs.maxiAudio.output = new Array(numChannels);
......@@ -33568,7 +33564,7 @@ this.setBufferSize = (function(newBufferSize) {
this.init = (function() {
this.context = new (window.AudioContext || window.webkitAudioContext);
this.source = this.context.createBufferSource();
this.jsProcessor = this.context.createScriptProcessor(bufferSize, numChannels, numChannels);
this.jsProcessor = this.context.createScriptProcessor(2048, numChannels, numChannels);
this.jsProcessor.onaudioprocess = process;
this.analyser = this.context.createAnalyser();
this.analyser.fftSize = 2048;
......@@ -65,6 +65,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</body>
<script type="text/javascript">
maximJs.maxiAudio.init();
var fft = new maximJs.maxiFFT();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment