Play song-preview instead of bg-music (if enabled) on names-, score- and highscore-screen.

This commit is contained in:
Florian Küpper committed 2014-08-09 19:50:40 +02:00
1 parent 04c2b85e2b
commit 8e8fdc1277
12 files changed
+48 -12

No files matched your search

+5 -1
View File
@@ -35,6 +35,8 @@ namespace VocaluxeLib
void SetBackgroundMusicVolume(int newVolume);
int GetBackgroundMusicVolume();
EOffOn GetBackgroundMusicStatus();
int GetPreviewMusicVolume();
EOffOn GetVideosToBackground();
@@ -150,6 +152,8 @@ namespace VocaluxeLib
void FadeTo(EScreens nextScreen);
float GetGlobalAlpha();
EScreens GetNextScreen();
}
public interface ILog
@@ -321,7 +325,7 @@ namespace VocaluxeLib
void Play(float start = -1);
void Load(CSong song, float start = 0f);
void Stop();
void Pause();
void TogglePause();
CTexture GetCover();
CTexture GetVideoTexture();
bool IsPlaying();
@@ -376,10 +376,11 @@ namespace VocaluxeLib.Menu.SongMenu
}
public virtual void OnShow() {}
public virtual void OnHide()
{
_ResetPreview();
if(CBase.Graphics.GetNextScreen() != EScreens.ScreenNames || CBase.Config.GetBackgroundMusicStatus() == EOffOn.TR_CONFIG_OFF)
_ResetPreview();
}
public abstract bool HandleInput(ref SKeyEvent keyEvent, SScreenSongOptions options);
@@ -110,7 +110,11 @@ namespace VocaluxeLib.Menu.SongMenu
set
{
if (value == base._PreviewNr)
{
if (!CBase.PreviewPlayer.IsPlaying())
CBase.PreviewPlayer.Play();
return;
}
base._PreviewNr = value;
_UpdatePreview();
}
+5 -1
View File
@@ -159,11 +159,15 @@ namespace VocaluxeLib.Utils.Player
public new void TogglePause()
{
base.TogglePause();
if (_Video != -1)
if (!IsPlaying && _Video != -1)
{
CBase.Video.Pause(_Video);
CBase.Video.Skip(_Video, CBase.Sound.GetPosition(_StreamID) + _FadeTime, _Song.VideoGap);
}
else if(_Video != -1)
{
CBase.Video.Resume(_Video);
}
}
public new void Update()
-1
View File
@@ -135,7 +135,6 @@
<Compile Include="PartyModes\IPartyMode.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Utils\CWavFile.cs" />
<Compile Include="Utils\Player\CPreviewPlayer.cs" />
<Compile Include="Utils\Player\CSongPlayer.cs" />
<Compile Include="Utils\Player\CSoundPlayer.cs" />
</ItemGroup>