Typo in VorbisWaveReader.cs?

Mar 25, 2013 at 11:16 PM
Edited Mar 25, 2013 at 11:28 PM
Hi,

I think I found a typo in the Position property of VorbisWaveReader, in the get statement.
public override long Position
{
    get
    {
        return (long)(_reader.DecodedTime.TotalMilliseconds * _reader.SampleRate * _reader.Channels * sizeof(float));
    }
The Length property uses TotalSeconds instead of TotalMilliseconds. Should not the Position property do the same?
public override long Position
{
    get
    {
        return (long)(_reader.DecodedTime.TotalSeconds * _reader.SampleRate * _reader.Channels * sizeof(float));
    }
Cheers!
Coordinator
Mar 27, 2013 at 5:07 PM
Kyopaxa,

You're absolutely right about this... I believe I intended for it to have a division by 1000, but your recommendation will work too.

I'll make a note and adjust it accordingly next time I have a minute.

Thanks!
Coordinator
Jun 27, 2013 at 8:50 PM
Kyopaxa,

Just FYI, I just pushed the update that includes this fix. Sorry it took so long.

Thanks!