mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-14 12:34:05 +09:00
debug view for dynamic tracks only
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user