#include #include #include "pcm.h" #include "utils.h" namespace _sbsms_ { long PcmReader :: read(float *buf, long block_size) { if(info.channels == 1) { float srcbuf[2*PCM_READ_BUF_SIZE]; long nread = -1; long nreadTotal = 0; while(nreadTotal < block_size && nread) { long ntoread = min((long)PCM_READ_BUF_SIZE,block_size-nreadTotal); nread = sf_readf_float(in, srcbuf, ntoread); for(int i=0;i