wpf_player.AudioPlayerModel.timeFromPosition C# (CSharp) Method

timeFromPosition() private method

Converts a position in the buffer to a time instant withing the range of the song lenght
private timeFromPosition ( long p ) : double
p long Position that we want to convert
return double
        private double timeFromPosition(long p)
        {
            if (rsc != null)
            {
                return ((double)p / rsc.Tag.FileSize) * rsc.Tag.Length;
            }
            else
            {
                return 0.0;
            }
        }