You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 31, 2024. It is now read-only.
thanks for your work. I wanted to contribute something back.
Instead of slice, which is very slow for big arrays, use following code to make seeking much faster:
` this.bufferOffset = startBufferAtIndex;
// not sure if this is the right place //$$
this.t = new RateTransposer(true);
this.s = new Stretch(true);
this.samples = new Float32Array(this.scriptBufferSize * 2);
this.s.tempo = this.slowDownPlaybackRate;
this.sourcez = {
extract: function (target, numFrames, position) {
if (my.l.length == 0) {
// reset
my.l = my.buffer.getChannelData(0);
if (my.buffer.numberOfChannels == 2) {
my.r = my.buffer.getChannelData(1);
} else {
my.r = my.l;
}
}
for (var i = 0; i < numFrames; i++) {
target[i * 2] = my.l[i + position + my.bufferOffset];
target[i * 2 + 1] = my.r[i + position + my.bufferOffset];
}
return Math.min(numFrames, my.l.length - position);
}
};
this.f = new SimpleFilter(this.sourcez, this.s); // need to be var f?
Hello,
thanks for your work. I wanted to contribute something back.
Instead of slice, which is very slow for big arrays, use following code to make seeking much faster:
` this.bufferOffset = startBufferAtIndex;
`