mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-14 12:34:05 +09:00
buffer size adjustments
This commit is contained in:
@@ -12,8 +12,9 @@ import kotlin.math.absoluteValue
|
||||
*/
|
||||
class MixerTrackProcessor(val bufferSize: Int, val rate: Int, val track: TerrarumAudioMixerTrack): Runnable {
|
||||
|
||||
val BACK_BUF_COUNT = 2
|
||||
|
||||
companion object {
|
||||
val BACK_BUF_COUNT = 1
|
||||
}
|
||||
|
||||
@Volatile private var running = true
|
||||
@Volatile private var paused = false
|
||||
@@ -163,6 +164,9 @@ class MixerTrackProcessor(val bufferSize: Int, val rate: Int, val track: Terraru
|
||||
maxSigLevel[index] = fl.toDouble()
|
||||
}
|
||||
}
|
||||
else {
|
||||
maxSigLevel.fill(0.0)
|
||||
}
|
||||
|
||||
|
||||
// by this time, the output buffer is filled with processed results, pause the execution
|
||||
|
||||
Reference in New Issue
Block a user