Fix: meaningless "Could not query position" messages in the log
This commit is contained in:
1 parent
60a6f8d347
commit
9599c1a616
1 file changed
+12
-6
@@ -70,14 +70,20 @@ namespace Vocaluxe.Lib.Sound.Playback.GstreamerSharp
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (_Element != null)
|
|
||||||
|
if (_Element == null || (_Element.CurrentState == State.Paused && _Element.PendingState != State.VoidPending))
|
||||||
{
|
{
|
||||||
long position;
|
return _Position;
|
||||||
if (!_Element.QueryPosition(Format.Time, out position))
|
|
||||||
CLog.LogError("Could not query position");
|
|
||||||
else
|
|
||||||
_Position = ((float)position / Constants.SECOND);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
long position;
|
||||||
|
if (!_Element.QueryPosition(Format.Time, out position))
|
||||||
|
CLog.LogError("Could not query position");
|
||||||
|
else
|
||||||
|
_Position = ((float)position / Constants.SECOND);
|
||||||
|
|
||||||
|
|
||||||
return _Position;
|
return _Position;
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
|
|||||||
Reference in new issue
Block a user