@@ -747,6 +747,7 @@ int printkset(CSOUND *csound, PRINTK *p)
747
747
/* Set up ctime so that if it was 0 or negative, it is set to a low value
748
748
* to ensure that the print cycle happens every k cycle. This low value is
749
749
* 1 / ekr */
750
+ /* Not sure this mattersin revised version. Would just work! -- JPff */
750
751
if (* p -> ptime < CS_ONEDKR )
751
752
p -> ctime = FL (0.0 );
752
753
else
@@ -761,11 +762,8 @@ int printkset(CSOUND *csound, PRINTK *p)
761
762
else if (UNLIKELY (p -> pspace > 120L ))
762
763
p -> pspace = 120L ;
763
764
764
- /* Set the initime variable - how many seconds in absolute time
765
- * when this instance of the instrument was initialised. */
766
-
767
765
//printf("printkset: ctime = %f\n", p->ctime);
768
- p -> printat = FL ( 0.0 ) ;
766
+ p -> printat = CS_KCNT ;
769
767
p -> initialised = -1 ;
770
768
return OK ;
771
769
}
@@ -782,7 +780,7 @@ int printk(CSOUND *csound, PRINTK *p)
782
780
783
781
//printf("printk: KCNT = %lu\n", CS_KCNT);
784
782
//printf("printat = %lf\n", p->printat);
785
-
783
+ /* Now test if the cycle number has reached the next print time */
786
784
if (p -> printat <= CS_KCNT - 1 ) {
787
785
/* Do the print cycle.
788
786
* Print instrument number and time. Instrument number stuff from
@@ -1135,7 +1133,7 @@ int printks(CSOUND *csound, PRINTKS *p)
1135
1133
sarg = ((STRINGDAT * )p -> ifilcod )-> data ;
1136
1134
if (sarg == NULL )
1137
1135
return csoundPerfError (csound , p -> h .insdshead , Str ("null string\n" ));
1138
- if (strcmp (sarg , p -> old ) != 0 ) {
1136
+ if (strcmp (sarg , p -> old ) != 0 ) {
1139
1137
printksset_ (csound , p , sarg );
1140
1138
csound -> Free (csound , p -> old );
1141
1139
p -> old = cs_strdup (csound , sarg );
0 commit comments