mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-10 13:51:53 +09:00
transition anim for gapless play
This commit is contained in:
@@ -179,8 +179,10 @@ object AudioMixer: Disposable {
|
||||
masterTrack.filters[2] = Spectro()
|
||||
masterTrack.filters[3] = Vecto(2f)
|
||||
|
||||
musicTrack.filters[1] = Spectro()
|
||||
ambientTrack.filters[1] = Spectro()
|
||||
musicTrack.filters[1] = Vecto()
|
||||
musicTrack.filters[2] = Spectro()
|
||||
ambientTrack.filters[1] = Vecto()
|
||||
ambientTrack.filters[2] = Spectro()
|
||||
|
||||
listOf(sumBus, convolveBusOpen, convolveBusCave).forEach {
|
||||
it.addSidechainInput(musicTrack, 1.0)
|
||||
|
||||
@@ -277,12 +277,14 @@ class TerrarumMusicGovernor : MusicGovernor() {
|
||||
}
|
||||
|
||||
// MixerTrackProcessor will call this function externally to make gapless playback work
|
||||
fun pullNextMusicTrack(): MusicContainer {
|
||||
fun pullNextMusicTrack(callNextMusicHook: Boolean = false): MusicContainer {
|
||||
// prevent same song to play twice in row (for the most time)
|
||||
if (musicBin.isEmpty()) {
|
||||
restockMUsicBin()
|
||||
}
|
||||
return songs[musicBin.removeAt(0)]
|
||||
return songs[musicBin.removeAt(0)].also { mus ->
|
||||
if (musicStartHooks.isNotEmpty()) musicStartHooks.forEach { it(mus) }
|
||||
}
|
||||
}
|
||||
|
||||
// MixerTrackProcessor will call this function externally to make gapless playback work
|
||||
|
||||
Reference in New Issue
Block a user