fix: bad cacheing behaviour

This commit is contained in:
minjaesong
2024-04-02 23:23:16 +09:00
parent 94152afcac
commit 9a8c91562e
6 changed files with 21 additions and 10 deletions

View File

@@ -210,7 +210,9 @@ class MixerTrackProcessor(bufferSize: Int, val rate: Int, val track: TerrarumAud
allocateStreamBuf(track)
}
streamBuf!!.fetchBytes()
if (track.currentTrack == null) throw IllegalStateException("Track ${track.name} is playing but also has null music track")
streamBuf?.fetchBytes() ?: throw NullPointerException("Null StreamBuf for ${track.name}")
}
var samplesL1: FloatArray