Fixed bg-music glitches.
This commit is contained in:
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; }
|
||||
|
||||
@@ -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; }
|
||||
|
||||
Reference in new issue
Block a user