I am using this class to read a wave stream but the derived stream class that I am using that contains the wave does not support setting the Postion (CanSeek == false).
public void ReadWaveHeader(Stream stream)
{ ...
while (stream.Position <= stopPosition - 8)
{...
stream.Position += chunkLength; //This line throws an expection.
}
...
}
Is it posible to use another metholody to read the wave that is not based on Postion? or is there another alternative?
Comments: By the way I think that : ``` stream.Position += chunkLength; ``` should really be : ``` stream.Position += ((chunkLength % 2 == 1) ? (chunkLength + 1) : chunkLength); ``` (both occurrences in this file) Given that 1 padding byte sometimes has to be skipped (chunks with an odd "specified" length L, actual length is L + 1 !) Will fix this when ... I understand how to submit a fix on Codeplex !
public void ReadWaveHeader(Stream stream)
{ ...
while (stream.Position <= stopPosition - 8)
{...
stream.Position += chunkLength; //This line throws an expection.
}
...
}
Is it posible to use another metholody to read the wave that is not based on Postion? or is there another alternative?
Comments: By the way I think that : ``` stream.Position += chunkLength; ``` should really be : ``` stream.Position += ((chunkLength % 2 == 1) ? (chunkLength + 1) : chunkLength); ``` (both occurrences in this file) Given that 1 padding byte sometimes has to be skipped (chunks with an odd "specified" length L, actual length is L + 1 !) Will fix this when ... I understand how to submit a fix on Codeplex !