fix: getFreeTrack() would return a track it just returned when the timing coincides

This commit is contained in:
minjaesong
2024-02-21 21:43:55 +09:00
parent 549c03c2b4
commit f7b0dfb5bb
5 changed files with 9 additions and 15 deletions

View File

@@ -381,15 +381,6 @@ class MixerTrackProcessor(bufferSize: Int, val rate: Int, val track: TerrarumAud
}
private fun <T> Queue<T>.removeFirstOrElse(function: () -> T): T {
return if (this.isEmpty) {
this.removeFirst()
}
else {
function()
}
}
class FeedSamplesToAdev(val bufferSize: Int, val rate: Int, val track: TerrarumAudioMixerTrack) : Runnable {
init {