且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

NAudio Waspi环回Goertzel

更新时间:2023-02-26 20:26:26

BlockCopy copies the number of bytes specified from source to dest with the last number being the number of bytes to copy, so instead (I think) what you want is instead

Buffer.BlockCopy(buffer, index, sampleBuffer, 0, bufferIncrement);

您正在做的是一遍又一遍地将整个源数组复制到目标.尽管我不确定为什么您不只想一次完成整个副本(这是您的第一个方法没有循环的结果)?

what you're doing is copying the entire source array to the destination over and over. Although I'm not sure why you wouldn't just want to do the entire copy at once (which is what your first method did without the loop)?