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
0c02b111
Commit
0c02b111
authored
Feb 26, 2016
by
Jakub Fiala
Browse files
added back the setBufferSize method
parent
a2a106f8
Changes
2
Hide whitespace changes
Inline
Side-by-side
maxiLib/maxiLib.js
View file @
0c02b111
...
...
@@ -33371,7 +33371,7 @@ maximJs.maxiAudio = function() {
this.source = null;
this.analyser = null;
this.jsProcessor = null;
this.bufferSize = 1024;
this.initDone = false;
};
...
...
@@ -33397,6 +33397,12 @@ maximJs.maxiAudio.prototype.setNumChannels = function(isArray, numChannels_){
this.resetAudio();
};
maximJs.maxiAudio.prototype.setBufferSize = function(newBufferSize) {
this.bufferSize = newBufferSize;
this.resetAudio();
};
// use this if you want to keep num of outputs but change
// method e.g. array or not
maximJs.maxiAudio.prototype.outputIsArray = function(isArray){
...
...
@@ -33416,7 +33422,7 @@ maximJs.maxiAudio.prototype.init = function() {
this.context = new (window.AudioContext || window.webkitAudioContext)();
this.source = this.context.createBufferSource();
this.jsProcessor = this.context.createScriptProcessor(
4096
, this.numChannels, this.numChannels);
this.jsProcessor = this.context.createScriptProcessor(
this.bufferSize
, this.numChannels, this.numChannels);
// var process = this.process;
this.jsProcessor.onaudioprocess = function(event) {
src/js/maxi_webAudio.js
View file @
0c02b111
...
...
@@ -203,7 +203,7 @@ maximJs.maxiAudio = function() {
this
.
source
=
null
;
this
.
analyser
=
null
;
this
.
jsProcessor
=
null
;
this
.
bufferSize
=
1024
;
this
.
initDone
=
false
;
};
...
...
@@ -229,6 +229,11 @@ maximJs.maxiAudio.prototype.setNumChannels = function(isArray, numChannels_){
this
.
resetAudio
();
};
maximJs
.
maxiAudio
.
prototype
.
setBufferSize
=
function
(
newBufferSize
)
{
this
.
bufferSize
=
newBufferSize
;
this
.
resetAudio
();
};
// use this if you want to keep num of outputs but change
// method e.g. array or not
maximJs
.
maxiAudio
.
prototype
.
outputIsArray
=
function
(
isArray
){
...
...
@@ -248,7 +253,7 @@ maximJs.maxiAudio.prototype.init = function() {
this
.
context
=
new
(
window
.
AudioContext
||
window
.
webkitAudioContext
)();
this
.
source
=
this
.
context
.
createBufferSource
();
this
.
jsProcessor
=
this
.
context
.
createScriptProcessor
(
4096
,
this
.
numChannels
,
this
.
numChannels
);
this
.
jsProcessor
=
this
.
context
.
createScriptProcessor
(
this
.
bufferSize
,
this
.
numChannels
,
this
.
numChannels
);
// var process = this.process;
this
.
jsProcessor
.
onaudioprocess
=
function
(
event
)
{
...
...
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