Close stream when finished (*-player)

This commit is contained in:
Florian Küpper committed 2014-08-09 17:16:51 +02:00
1 parent 4c01396e46
commit 04c2b85e2b
2 files changed
+6

No files matched your search

+4
View File
@@ -106,6 +106,8 @@ namespace VocaluxeLib.Utils.Player
if (song == null) if (song == null)
return; return;
Close();
_Song = song; _Song = song;
_LoadVideo(); _LoadVideo();
base.Load(Path.Combine(song.Folder, song.MP3FileName), position, autoplay); base.Load(Path.Combine(song.Folder, song.MP3FileName), position, autoplay);
@@ -116,6 +118,8 @@ namespace VocaluxeLib.Utils.Player
if (String.IsNullOrEmpty(file)) if (String.IsNullOrEmpty(file))
return; return;
Close();
_Song = null; _Song = null;
base.Load(file, position, autoplay); base.Load(file, position, autoplay);
} }
+2
View File
@@ -73,6 +73,8 @@ namespace VocaluxeLib.Utils.Player
if (IsPlaying) if (IsPlaying)
Stop(); Stop();
Close();
_StreamID = CBase.Sound.Load(file, false, true); _StreamID = CBase.Sound.Load(file, false, true);
if (position > 0f) if (position > 0f)
Position = position; Position = position;