Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Daniel Clarke
maxi-js-emscripten
Commits
05943e12
Commit
05943e12
authored
Feb 12, 2016
by
Mick Grierson
Browse files
added buffersize method
parent
14461d94
Changes
1
Show whitespace changes
Inline
Side-by-side
maxiLib/maxiLib.js
View file @
05943e12
...
...
@@ -33508,6 +33508,7 @@ maximJs.maxiTools.loadSample = function(url, samplePlayer, contextIn) {
// });
maximJs.maxiAudio = (function() {
var numChannels = 2;
var bufferSize = 1024;
var output = 0;
this.context = null;
this.source = null;
...
...
@@ -33526,6 +33527,10 @@ 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);
...
...
@@ -33563,7 +33568,7 @@ maximJs.maxiAudio = (function() {
this.init = (function() {
this.context = new (window.AudioContext || window.webkitAudioContext);
this.source = this.context.createBufferSource();
this.jsProcessor = this.context.createScriptProcessor(
4096
, numChannels, numChannels);
this.jsProcessor = this.context.createScriptProcessor(
bufferSize
, numChannels, numChannels);
this.jsProcessor.onaudioprocess = process;
this.analyser = this.context.createAnalyser();
this.analyser.fftSize = 2048;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment