Fix sample length calculation using fixed sample rate.
The calculation for `sampleLength` now uses a fixed sample rate of 48000.0 instead of potentially incorrect dynamic sample rate. This change ensures consistent audio processing regardless of the sample rate provided elsewhere in the application.
This commit is contained in:
@@ -85,7 +85,7 @@ class VstChipProcessor : AudioWorkletProcessor() {
|
||||
var recordingSample = 0
|
||||
var recordingStart = 0
|
||||
|
||||
val sampleLength = 1 / sampleRate.toDouble()
|
||||
val sampleLength = 1 / 48000.0 //sampleRate.toDouble()
|
||||
|
||||
val rightDelayBuffer = Float32Array(sampleRate)
|
||||
val leftDelayBuffer = Float32Array(sampleRate)
|
||||
|
||||
Reference in New Issue
Block a user