audio engine: resize buffer without restarting the game

This commit is contained in:
minjaesong
2024-01-16 03:31:22 +09:00
parent 755ced9ea4
commit 2bd1b61a35
20 changed files with 39 additions and 121 deletions

View File

@@ -187,16 +187,6 @@ class TerrarumAudioMixerTrack(
}*/
}
fun updateBufferSizeChange() {
// printdbg(this, "new buffer size: $App.audioMixerBufferSize")
pcmQueue.clear()
pcmQueue.addLast(listOf(FloatArray(App.audioBufferSize), FloatArray(App.audioBufferSize)))
pcmQueue.addLast(listOf(FloatArray(App.audioBufferSize), FloatArray(App.audioBufferSize)))
processor.reset(App.audioBufferSize)
filters.forEach { it.reset() }
}
override fun hashCode() = hashCode0
}