diff --git a/P3D/Resources/Sound/MusicManager.vb b/P3D/Resources/Sound/MusicManager.vb index cb4ee74f9..096d1c21e 100644 --- a/P3D/Resources/Sound/MusicManager.vb +++ b/P3D/Resources/Sound/MusicManager.vb @@ -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() diff --git a/P3D/Screens/BattleIntroScreen.vb b/P3D/Screens/BattleIntroScreen.vb index 8d8f6fd67..781ab0f25 100644 --- a/P3D/Screens/BattleIntroScreen.vb +++ b/P3D/Screens/BattleIntroScreen.vb @@ -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