mirror of
https://git.alee14.me/shiftos-archive/ShiftOS_TheReturn.git
synced 2025-01-22 18:02:16 +00:00
fix MANY AUDIO BUGS
This commit is contained in:
parent
46a92866f8
commit
2e36fa7197
1 changed files with 8 additions and 8 deletions
|
@ -88,17 +88,17 @@ namespace ShiftOS.Engine
|
|||
_reader = new AudioFileReader(file);
|
||||
_out = new WaveOut();
|
||||
_out.Init(_reader);
|
||||
try
|
||||
{
|
||||
_out.Volume = (float)SaveSystem.CurrentSave.SfxVolume / 100;
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
_out.Play();
|
||||
if (SaveSystem.CurrentSave == null)
|
||||
_out.Volume = 1.0f;
|
||||
else
|
||||
_out.Volume = (float)SaveSystem.CurrentSave.MusicVolume / 100;
|
||||
_out.PlaybackStopped += (o, a) => { PlayCompleted?.Invoke(); };
|
||||
}
|
||||
catch { }
|
||||
catch(Exception ex)
|
||||
{
|
||||
Console.WriteLine("Audio error: " + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in a new issue