mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-14 12:34:05 +09:00
trying to fix glitchy audio after load
This commit is contained in:
@@ -147,7 +147,7 @@ class AudioProcessBuf(val inputSamplingRate: Int, val audioReadFun: (ByteArray)
|
||||
private val readBuf = ByteArray(fetchSize * 4)
|
||||
|
||||
init {
|
||||
printdbg(this, "App.audioMixerBufferSize=${App.audioBufferSize}")
|
||||
// printdbg(this, "App.audioMixerBufferSize=${App.audioBufferSize}")
|
||||
}
|
||||
|
||||
private fun shift(array: FloatArray, size: Int) {
|
||||
|
||||
@@ -162,6 +162,8 @@ class TerrarumAudioMixerTrack(
|
||||
override fun equals(other: Any?) = this.hash == (other as TerrarumAudioMixerTrack).hash
|
||||
|
||||
fun stop() {
|
||||
printdbg(this, "Stop music (mixertrack=${this.name}, musictrack=$currentTrack)")
|
||||
|
||||
currentTrack?.reset()
|
||||
|
||||
streamPlaying.set(false)
|
||||
|
||||
Reference in New Issue
Block a user