mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-18 06:24:06 +09:00
reloading the engine will copy track states from the old instance, obsoleting audioMixerRenewHooks
This commit is contained in:
@@ -11,7 +11,7 @@ import net.torvald.terrarum.ui.BasicDebugInfoWindow.Companion.STRIP_W
|
||||
import net.torvald.terrarum.ui.Toolkit
|
||||
import kotlin.math.*
|
||||
|
||||
class Spectro(val gain: Float = 1f) : TerrarumAudioFilter() {
|
||||
class Spectro(var gain: Float = 1f) : TerrarumAudioFilter() {
|
||||
private val FFTSIZE = 1024
|
||||
private val inBuf = Array(2) { FloatArray(FFTSIZE) }
|
||||
|
||||
@@ -91,10 +91,16 @@ class Spectro(val gain: Float = 1f) : TerrarumAudioFilter() {
|
||||
}
|
||||
|
||||
override val debugViewHeight = STRIP_W
|
||||
|
||||
override fun copyParamsFrom(other: TerrarumAudioFilter) {
|
||||
if (other is Spectro) {
|
||||
this.gain = other.gain
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class Vecto(val gain: Float = 1f) : TerrarumAudioFilter() {
|
||||
class Vecto(var gain: Float = 1f) : TerrarumAudioFilter() {
|
||||
var backbufL = Array((6144f / App.audioBufferSize).roundToInt().coerceAtLeast(1)) {
|
||||
FloatArray(App.audioBufferSize)
|
||||
}
|
||||
@@ -154,4 +160,10 @@ class Vecto(val gain: Float = 1f) : TerrarumAudioFilter() {
|
||||
}
|
||||
|
||||
override val debugViewHeight = STRIP_W
|
||||
|
||||
override fun copyParamsFrom(other: TerrarumAudioFilter) {
|
||||
if (other is Vecto) {
|
||||
this.gain = other.gain
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user