trying to fix glitchy audio after load

This commit is contained in:
minjaesong
2024-02-21 14:06:49 +09:00
parent 063483cfda
commit 91c5105a12
6 changed files with 45 additions and 18 deletions

View File

@@ -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) {

View File

@@ -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)