shithub: pplay

Download patch

ref: 6dda20c28ef5b8aa65ada672a4a388d0ea8f6f77
parent: f87b680a865536dafad94ed9e08e62970519450b
author: qwx <qwx@sciops.net>
date: Wed Jul 26 00:25:24 EDT 2023

pcmmix: maybe write the file before commiting it

--- a/pcmmix.c
+++ b/pcmmix.c
@@ -76,7 +76,6 @@
 			fp->n = read(fp->fd, fp->buf+fp->Δ, m);
 			if(n == 0 || notrunc && n < fp->n || !notrunc && n > fp->n)
 				n = fp->n;
-			fprint(2, "%zd n %d fp->n %d Δ %d\n", fp-ftab, n, fp->n, fp->Δ);
 			if(fp->n > 0)
 				continue;
 			fp->fd = -1;
@@ -83,7 +82,7 @@
 			if(!notrunc)
 				exits(nil);
 			if(fp->n < 0)
-				fprint(2, "file %s: read: %r\n", fp->path);
+				fprint(2, "read %s: %r\n", fp->path);
 		}
 		if(n <= 0)
 			break;