debug view for dynamic tracks only

This commit is contained in:
minjaesong
2024-02-05 05:12:03 +09:00
parent 23921c7f7c
commit 17c7571915
5 changed files with 70 additions and 10 deletions

View File

@@ -114,7 +114,7 @@ class AudioMixer(val bufferSize: Int): Disposable {
get() = tracks[11]
val ambientTracks = arrayOf(
ambientTrack1, ambientTrack2
ambientTrack1, ambientTrack2, ambientTrack3, ambientTrack4
)
var processing = false
@@ -214,7 +214,7 @@ class AudioMixer(val bufferSize: Int): Disposable {
init {
// initialise audio paths //
listOf(musicTrack, ambientTrack1, ambientTrack2).forEach {
listOf(musicTrack, ambientTrack1, ambientTrack2, ambientTrack3, ambientTrack4).forEach {
it.filters[0] = Gain(1f)
}
@@ -228,8 +228,11 @@ class AudioMixer(val bufferSize: Int): Disposable {
ambientTracks.forEach {
it.filters[1] = Vecto(decibelsToFullscale(24.0).toFloat())
it.filters[2] = Spectro()
amb1plus2.addSidechainInput(it, 1.0)
}
amb1plus2.addSidechainInput(ambientTrack1, 1.0)
amb1plus2.addSidechainInput(ambientTrack2, 1.0)
sfxSumBus.filters[1] = Vecto(0.7071f)
sfxSumBus.filters[2] = Spectro()

View File

@@ -140,7 +140,7 @@ class BinoPan(var pan: Float, var earDist: Float = EARDIST_DEFAULT): TerrarumAud
else "R${pan.absoluteValue.times(100).toIntAndFrac(3,1)}"
App.fontSmallNumbers.draw(batch, panLabel, x+3f, y+1f)
App.fontSmallNumbers.draw(batch, "AS:${AudioMixer.SPEED_OF_SOUND.roundToInt()}", x+3f, y+17f)
App.fontSmallNumbers.draw(batch, "H:${earDist.toIntAndFrac(1,3)}", x+3f, y+17f)
}
override val debugViewHeight = 32

View File

@@ -51,6 +51,8 @@ open class LoFi(
}
private fun saturatorThru(inbuf: List<FloatArray>, outbuf: List<FloatArray>) {
downForce.fill(1.0f)
for (ch in inbuf.indices) {
for (i in inbuf[ch].indices) {
val u = inbuf[ch][i]
@@ -74,9 +76,10 @@ open class LoFi(
}
override fun drawDebugView(batch: SpriteBatch, x: Int, y: Int) {
convolver.drawDebugView(batch, x, y)
}
override val debugViewHeight = 0
override val debugViewHeight = 16
override fun copyParamsFrom(other: TerrarumAudioFilter) {
this.convolver.copyParamsFrom((other as LoFi).convolver)