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.
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.