mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 20:31:51 +09:00
wtf is going on
This commit is contained in:
@@ -111,6 +111,7 @@ class MixerTrackProcessor(val buffertaille: Int, val rate: Int, val track: Terra
|
||||
(track.filters[0] as BinoPan).pan = 0f
|
||||
}
|
||||
else if (track.trackingTarget is ActorWithBody) {
|
||||
// FIXME this may cause filter to fill the output buffer with NaNs?
|
||||
val relativeXpos = relativeXposition(AudioMixer.actorNowPlaying!!, track.trackingTarget as ActorWithBody)
|
||||
track.volume = track.maxVolume * (1.0 - relativeXpos.absoluteValue.pow(0.5) / distFalloff)
|
||||
(track.filters[0] as BinoPan).pan = ((2*asin(relativeXpos / distFalloff)) / Math.PI).toFloat()
|
||||
|
||||
@@ -469,7 +469,7 @@ class BasicDebugInfoWindow : UICanvas() {
|
||||
private val dbLow = 60.0
|
||||
|
||||
private val oldPeak = Array(trackCount) { arrayOf(0.0, 0.0) }
|
||||
private val oldPeakDS = Array(256) { arrayOf(0.0, 0.0) }
|
||||
private val oldPeakDS = Array(App.getConfigInt("audio_dynamic_source_max")) { arrayOf(0.0, 0.0) }
|
||||
private val oldRMS = Array(trackCount) { arrayOf(0.0, 0.0) }
|
||||
private val oldComp = Array(trackCount) { arrayOf(0.0, 0.0) }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user