This commit is contained in:
CaptainSegis 2019-01-13 12:06:55 -05:00
commit 179d94ccd6
2 changed files with 5 additions and 2 deletions

View File

@ -213,7 +213,10 @@ Public Class MusicManager
If Not song Is Nothing Then
Logger.Debug($"Play song [{song.Name}]")
MediaPlayer.Play(song.Song)
' We wait here for a short amount of time before playing the song
' to mitigate an issue with the mediaplayer: without a timespan arg it sometimes does not play the song
' and when started from 0, it plays the last few frames of the song and then starts at the beginning
MediaPlayer.Play(song.Song, New TimeSpan(0, 0, 0, 0, 25)) ' 25ms
If MediaPlayer.IsMuted Then
MediaPlayer.Pause()

View File

@ -506,7 +506,7 @@
Player.Temp.BeforeBattleLevelFile = Screen.Level.LevelFile
Player.Temp.BeforeBattleFacing = Screen.Camera.GetPlayerFacingDirection()
MusicManager.Play(MusicLoop, False, 0F)
'MediaPlayer.IsRepeating = False
MediaPlayer.IsRepeating = False
If Not MusicManager.CurrentSong Is Nothing Then
Me.duration = MusicManager.CurrentSong.Song.Duration