refactor all the audio stuff into classes and a separate file
This commit is contained in:
@ -1,9 +1,8 @@
|
||||
class OwrxAudioProcessor extends AudioWorkletProcessor {
|
||||
constructor(options){
|
||||
super(options);
|
||||
this.maxLength = options.processorOptions.maxLength;
|
||||
// initialize ringbuffer, make sure it aligns with the expected buffer size of 128
|
||||
this.bufferSize = Math.round(sampleRate * this.maxLength / 128) * 128
|
||||
this.bufferSize = Math.round(options.processorOptions.maxBufferSize / 128) * 128
|
||||
this.audioBuffer = new Float32Array(this.bufferSize);
|
||||
this.inPos = 0;
|
||||
this.outPos = 0;
|
||||
|
Reference in New Issue
Block a user