NAudio使用之BlockAlignReductionStream类使用疑惑

BlockAlignReductionStream allows you to position at the block align of the pcm format, but not necessary the block align of the source wavestream (for example: a compressed stream block), and it lets you read the size of data not have to be a whole block size of the source block.
The code below tells what the block align of pcm is:

        public override int BlockAlign
        {
            get
            {
                // can position to sample level
                return (WaveFormat.BitsPerSample / 8) * WaveFormat.Channels;
            }
        }

It implements a buffer inside, and doing back position and over read to make sure all the operation to the source stream is fit to the source block align.

文章转自 http://www.tomatosoft.biz/blog/2011/11/01/description-of-naudio-class-blockalignreductionstream/

又有 http://blog.csdn.net/sshcx/article/details/1593923


posted @ 2016-05-22 20:41  cloudren2020  阅读(127)  评论(0编辑  收藏  举报