mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-10 10:34:06 +09:00
fix: MP3 would not play if buffer size < 1152
This commit is contained in:
@@ -454,7 +454,7 @@ class BasicDebugInfoWindow : UICanvas() {
|
||||
private val oldRMS = Array(trackCount) { arrayOf(0.0, 0.0) }
|
||||
private val oldComp = Array(trackCount) { arrayOf(0.0, 0.0) }
|
||||
|
||||
private fun getSmoothingFactor(sampleCount: Int) = 1.0 - (AUDIO_BUFFER_SIZE / sampleCount)
|
||||
private fun getSmoothingFactor(sampleCount: Int) = 1.0 - (AUDIO_BUFFER_SIZE.toDouble() / sampleCount)
|
||||
private val PEAK_SMOOTHING_FACTOR = getSmoothingFactor(640)
|
||||
private val LAMP_SMOOTHING_FACTOR = getSmoothingFactor(3200)
|
||||
private val RMS_SMOOTHING_FACTOR = getSmoothingFactor(12000)
|
||||
|
||||
Reference in New Issue
Block a user