Fixed bg-music glitches.

This commit is contained in:
Florian Küpper committed 2015-01-16 17:32:32 +01:00
1 parent 247bff132b
commit 94539bbf92
3 files changed
+8 -1

No files matched your search

@@ -36,6 +36,11 @@ namespace Vocaluxe.Lib.Sound.Playback
get { return _ID; }
}
public bool IsFading
{
get { return _Fading != null; }
}
public virtual float Volume { get; set; }
public virtual float VolumeMax { get; set; }
public virtual float Length { get; protected set; }
+2 -1
View File
@@ -74,7 +74,8 @@ namespace Vocaluxe.Lib.Sound.Playback
return;
float volumeF = volume.Clamp(0, 100) / 100f;
foreach (IAudioStream stream in _Streams)
stream.VolumeMax = volumeF;
if(!stream.IsFading)
stream.VolumeMax = volumeF;
_GlobalVolume = volumeF;
}
@@ -28,6 +28,7 @@ namespace Vocaluxe.Lib.Sound.Playback
public interface IAudioStream : IDisposable
{
int ID { get; }
bool IsFading { get; }
float Volume { get; set; }
float VolumeMax { get; set; }
float Length { get; }