Quantcast
Channel: naudio Work Item Rss Feed
Viewing all articles
Browse latest Browse all 738

Commented Issue: WaveFileChunkReader.ReadWaveHeader assumes that the stream supports position/seek [16354]

$
0
0
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: I wouldn't want to make a change like that unless it was officially part of the RIFF file spec. There are all kinds of wierd WAV files out there, and it has proved nearly impossible to create a reader that copes with them all.

Viewing all articles
Browse latest Browse all 738

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>