Some improvements.
This commit is contained in:
1 parent
6dda1a38d0
commit
6c4fe011bf
6 files changed
+55
-66
No files matched your search
@@ -28,7 +28,6 @@ namespace VocaluxeLib.Utils.Player
|
||||
set {
|
||||
if(_StreamID == -1)
|
||||
return;
|
||||
CBase.Sound.SetPosition(_StreamID, value);
|
||||
_StartPosition = value;
|
||||
}
|
||||
get {
|
||||
@@ -73,8 +72,6 @@ namespace VocaluxeLib.Utils.Player
|
||||
if (IsPlaying)
|
||||
Stop();
|
||||
|
||||
Close();
|
||||
|
||||
_StreamID = CBase.Sound.Load(file, false, true);
|
||||
if (position > 0f)
|
||||
Position = position;
|
||||
@@ -115,7 +112,9 @@ namespace VocaluxeLib.Utils.Player
|
||||
if (_StreamID == -1 || !IsPlaying)
|
||||
return;
|
||||
|
||||
CBase.Sound.Fade(_StreamID, 0f, _FadeTime, EStreamAction.Stop);
|
||||
CBase.Sound.Fade(_StreamID, 0f, _FadeTime, EStreamAction.Close);
|
||||
_StreamID = -1;
|
||||
|
||||
IsPlaying = false;
|
||||
}
|
||||
|
||||
@@ -139,16 +138,6 @@ namespace VocaluxeLib.Utils.Player
|
||||
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
if (_StreamID == -1)
|
||||
return;
|
||||
|
||||
CBase.Sound.Close(_StreamID);
|
||||
_StreamID = -1;
|
||||
IsPlaying = false;
|
||||
}
|
||||
|
||||
private void _ApplyVolume()
|
||||
{
|
||||
if (_StreamID == -1)
|
||||
|
||||
Reference in new issue
Block a user