Prevent next song playing before fade done

This commit is contained in:
JappaWakka 2024-05-15 17:08:45 +02:00
parent 873411d40e
commit b48debe4e2
1 changed files with 37 additions and 35 deletions

View File

@ -45,7 +45,8 @@ Public Class LoopStream
_sourceStream.Position = 0 _sourceStream.Position = 0
Else Else
If Not _sourceStream.Position = 0 Then If Not _sourceStream.Position = 0 Then
If MusicManager.Playlist.Count > 1 And MusicManager._isCurrentlyFading = False Then If MusicManager._isCurrentlyFading = False Then
If MusicManager.Playlist.Count > 1 Then
MusicManager.Playlist.RemoveAt(0) MusicManager.Playlist.RemoveAt(0)
ElseIf MusicManager.EnableLooping = False AndAlso MusicManager.Playlist.Count > 0 Then ElseIf MusicManager.EnableLooping = False AndAlso MusicManager.Playlist.Count > 0 Then
MusicManager.Playlist.RemoveAt(0) MusicManager.Playlist.RemoveAt(0)
@ -83,6 +84,7 @@ Public Class LoopStream
MusicManager._currentSongName = "silence" MusicManager._currentSongName = "silence"
Logger.Debug($"Play song [silence]") Logger.Debug($"Play song [silence]")
End If End If
End If
Else Else
Exit While Exit While
End If End If