Fix unintended song loop due to api change

This commit is contained in:
Flamefire committed 2014-05-07 00:39:58 +02:00
1 parent 292a9f3c69
commit e908f923e8
6 files changed
+10 -15

No files matched your search

+2 -2
View File
@@ -773,9 +773,9 @@ namespace Vocaluxe.Base
class CBsound : ISound
{
public int Load(string soundFile, bool prescan)
public int Load(string soundFile, bool loop = false, bool prescan = false)
{
return CSound.Load(soundFile, prescan);
return CSound.Load(soundFile, loop, prescan);
}
public void SetPosition(int soundStream, float newPosition)
+3 -8
View File
@@ -85,14 +85,9 @@ namespace Vocaluxe.Base
}
#region Stream Handling
public static int Load(string media)
public static int Load(string media, bool loop=false, bool prescan=false)
{
return _Playback.Load(media);
}
public static int Load(string media, bool prescan)
{
return _Playback.Load(media, prescan);
return _Playback.Load(media, loop, prescan);
}
public static void Close(int stream)
@@ -194,7 +189,7 @@ namespace Vocaluxe.Base
if (!File.Exists(file))
return -1;
int stream = Load(file, fade);
int stream = Load(file, false, fade);
if (stream < 0)
return -1;
Play(stream);
+1 -1
View File
@@ -597,7 +597,7 @@ namespace Vocaluxe.Screens
songname += " (" + CGame.RoundNr + "/" + rounds + ")";
_Texts[_TextSongName].Text = songname;
_CurrentStream = CSound.Load(song.GetMP3(), true);
_CurrentStream = CSound.Load(song.GetMP3(), false, true);
CSound.SetStreamVolume(_CurrentStream, _Volume);
CSound.SetPosition(_CurrentStream, song.Start);
_CurrentTime = song.Start;