audio engine: resize buffer without restarting the game

This commit is contained in:
minjaesong
2024-01-16 03:31:22 +09:00
parent 755ced9ea4
commit 2bd1b61a35
20 changed files with 39 additions and 121 deletions

View File

@@ -91,9 +91,6 @@ class Spectro(val gain: Float = 1f) : TerrarumAudioFilter() {
}
override val debugViewHeight = STRIP_W
override fun reset() {
}
}
@@ -157,13 +154,4 @@ class Vecto(val gain: Float = 1f) : TerrarumAudioFilter() {
}
override val debugViewHeight = STRIP_W
override fun reset() {
backbufL = Array((6144f / App.audioBufferSize).roundToInt().coerceAtLeast(1)) {
FloatArray(App.audioBufferSize)
}
backbufR = Array((6144f / App.audioBufferSize).roundToInt().coerceAtLeast(1)) {
FloatArray(App.audioBufferSize)
}
}
}