diff --git a/VocaluxeLib/Utils/Player/CSongPlayer.cs b/VocaluxeLib/Utils/Player/CSongPlayer.cs index 88e02bd4..8238e35e 100644 --- a/VocaluxeLib/Utils/Player/CSongPlayer.cs +++ b/VocaluxeLib/Utils/Player/CSongPlayer.cs @@ -106,6 +106,8 @@ namespace VocaluxeLib.Utils.Player if (song == null) return; + Close(); + _Song = song; _LoadVideo(); base.Load(Path.Combine(song.Folder, song.MP3FileName), position, autoplay); @@ -116,6 +118,8 @@ namespace VocaluxeLib.Utils.Player if (String.IsNullOrEmpty(file)) return; + Close(); + _Song = null; base.Load(file, position, autoplay); } diff --git a/VocaluxeLib/Utils/Player/CSoundPlayer.cs b/VocaluxeLib/Utils/Player/CSoundPlayer.cs index 533d4e21..499df3f1 100644 --- a/VocaluxeLib/Utils/Player/CSoundPlayer.cs +++ b/VocaluxeLib/Utils/Player/CSoundPlayer.cs @@ -73,6 +73,8 @@ namespace VocaluxeLib.Utils.Player if (IsPlaying) Stop(); + Close(); + _StreamID = CBase.Sound.Load(file, false, true); if (position > 0f) Position = position;