On Fri, 2007-04-06 at 18:24 +0200, Marco Gerards wrote: > Changing samplecnt to an unsigned int solved the problem. I am > sorry it took me this much time to notice this problem. I think you still missed another problem (overflow).