Some improvements...
This commit is contained in:
1 parent
eef988fcdb
commit
6f617aa40b
6 files changed
+19
-2
No files matched your search
@@ -333,6 +333,12 @@ namespace Vocaluxe.Base
|
||||
Play();
|
||||
}
|
||||
|
||||
public static void StopPreview()
|
||||
{
|
||||
_PreviewPlayer.Close();
|
||||
_PlaysPreview = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// (Re-)Starts the _CurrentPlaylistElement
|
||||
/// </summary>
|
||||
|
||||
@@ -395,6 +395,11 @@ namespace Vocaluxe.Base
|
||||
CBackgroundMusic.PlayPreview(start);
|
||||
}
|
||||
|
||||
public void StopPreview()
|
||||
{
|
||||
CBackgroundMusic.StopPreview();
|
||||
}
|
||||
|
||||
public CTexture GetVideoTexture()
|
||||
{
|
||||
return CBackgroundMusic.GetVideoTexture();
|
||||
|
||||
@@ -135,6 +135,7 @@ namespace VocaluxeLib
|
||||
|
||||
void LoadPreview(CSong song, float start = 0f);
|
||||
void PlayPreview(float start = -1f);
|
||||
void StopPreview();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -500,7 +500,9 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
|
||||
private void _PlaySong(int nr)
|
||||
{
|
||||
_ResetPreview();
|
||||
_PreviewNrInternal = -1;
|
||||
|
||||
CBase.BackgroundMusic.StopPreview();
|
||||
|
||||
CSong song = CBase.Songs.GetVisibleSong(nr);
|
||||
if (song == null)
|
||||
|
||||
@@ -458,7 +458,10 @@ namespace VocaluxeLib.Songs
|
||||
if (Preview.Source == EDataSource.None)
|
||||
{
|
||||
if (Medley.Source != EDataSource.None)
|
||||
{
|
||||
Preview.StartTime = CBase.Game.GetTimeFromBeats(Medley.StartBeat, BPM);
|
||||
Preview.Source = EDataSource.Calculated;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -416,7 +416,7 @@ namespace VocaluxeLib.Songs
|
||||
{
|
||||
//PreviewStart is not set or <=0
|
||||
_Song.Preview.StartTime = (headerFlags & EHeaderFlags.MedleyStartBeat) != 0 ? CBase.Game.GetTimeFromBeats(_Song.Medley.StartBeat, _Song.BPM) : 0f;
|
||||
_Song.Preview.Source = EDataSource.Calculated;
|
||||
_Song.Preview.Source = _Song.Preview.StartTime == 0 ? EDataSource.None : EDataSource.Calculated;
|
||||
}
|
||||
|
||||
if ((headerFlags & EHeaderFlags.MedleyStartBeat) != 0 && (headerFlags & EHeaderFlags.MedleyEndBeat) != 0)
|
||||
|
||||
Reference in new issue
Block a user