Some code-cleanup.

This commit is contained in:
Florian Küpper committed 2014-08-20 19:14:20 +02:00
1 parent d0958b69be
commit eef988fcdb
2 files changed
+2 -21

No files matched your search

+1 -1
View File
@@ -346,7 +346,7 @@ namespace Vocaluxe.Base
//otherwhise load
if (_BGMusicFiles.Contains(_CurrentPlaylistElement))
_SongPlayer.Load(_CurrentPlaylistElement.MusicFilePath, 0f, true);
_SongPlayer.LoadFile(_CurrentPlaylistElement.MusicFilePath, 0f, true);
else
{
//Seek to #Start-Tag, if found
+1 -20
View File
@@ -113,7 +113,7 @@ namespace VocaluxeLib.Utils.Player
base.Load(Path.Combine(song.Folder, song.MP3FileName), position, autoplay);
}
public void Load(string file, float position = 0f, bool autoplay = false)
public void LoadFile(string file, float position = 0f, bool autoplay = false)
{
if (String.IsNullOrEmpty(file))
return;
@@ -170,25 +170,6 @@ namespace VocaluxeLib.Utils.Player
}
}
public new void Update()
{
if (_StreamID == -1 || !IsPlaying)
return;
float timeToPlay;
float len = CBase.Sound.GetLength(_StreamID);
timeToPlay = (len > 0f) ? len - CBase.Sound.GetPosition(_StreamID) : _FadeTime + 1f;
bool finished = CBase.Sound.IsFinished(_StreamID);
if (timeToPlay <= _FadeTime || finished)
{
if (RepeatSong)
Play();
else
Stop();
}
}
private void _LoadVideo()
{
if (_Song == null)