Add samplecount check and chans.release();