On Wed, May 15, 2019 at 02:05:33PM -0700, Pete Goodeve wrote: > > [.....] > in printkset: > p->printat = CS_KCNT; > > in printk: > /* Now test if the cycle number has reached the next print time */ > if (p->printat <= CS_KCNT-1) { > /* Do the print cycle. > ...*/ > p->printat += p->ctime; > } > > > Without actually checking, it looks to me as if the fix is to change > that last line to: > > p->printat = CS_KCNT + p->ctime; > > so it always set its next printout to p->ctime from "now". > > Does that look right? > well, I did actually try that fix, and it isn't quite right. There's an extra k-cycle delay in each printout. I'm not quite sure why the check is against 'CS_KCNT-1' rather than just CS_KCNT, but I assume there is some reason, so instead I used the modified increment line (in both printk and printks): p->printat = CS_KCNT + p->ctime - 1; which on testing behaves precisely as I would expect. I could try posting a PR, but there's a PR of mine from about a month back (for a minor fix to Haiku plugin location) that has never been dealt with, and Git confuses me so much that I don't want to add anything on top of it! -- Pete -- Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here