Skip to content
Snippets Groups Projects
Commit 351db365 authored by Mick Grierson's avatar Mick Grierson
Browse files

added buffersize method

parent 05943e12
1 merge request!1loadSample method that works with base64 strings
......@@ -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();
......
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