You can't change the length of a WaveStream. I'd probably create a wrapper WaveStream with a shorter duration, whose Read method passes into the full WaveFileReader, but doesn't read more than the specified length. Have a look at OffsetSampleProvider for an idea of how this would be implemented.
↧