The BlockAlignReductionStream uses a circular buffer to allow unaligned reading from an otherwise block aligned source stream. If the user tries to read more bytes than would fit in the circular buffer, the BlockAlignReductionStream only reads the amount that fits in the circular buffer, but internally advanced the input stream by the actual requested number of bytes. Future read requests will therefore miss a portion of the input stream.
A simple fix would be to clamp the number of bytes read from the input stream to the size of the circular buffer. I could not find the svn url for the source tree or figure out where to submit a patch, so I just attached the modified source file.
Comments: proposed solution could cause problems elsewhere in NAudio, so no plan to fix this at the moment. Recommend not using BlockAlignReductionStream if you want to read large chunks
A simple fix would be to clamp the number of bytes read from the input stream to the size of the circular buffer. I could not find the svn url for the source tree or figure out where to submit a patch, so I just attached the modified source file.
Comments: proposed solution could cause problems elsewhere in NAudio, so no plan to fix this at the moment. Recommend not using BlockAlignReductionStream if you want to read large chunks