shithub: dumb

Download patch

ref: 6620310ca002f8b6bf0a12dbba119022aafc8825
parent: 0120570de7ff3b444b08aa4fa628c5484f3731d1
author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
date: Fri Mar 5 06:49:12 EST 2021

moddec: remove -n, use /dev/mordor to skip the audio

--- a/examples/moddec.c
+++ b/examples/moddec.c
@@ -15,7 +15,7 @@
 static void
 usage(void)
 {
-	fprint(2, "usage: %s [-n] [-s SECONDS]\n", argv0);
+	fprint(2, "usage: %s [-s SECONDS]\n", argv0);
 	exits("usage");
 }
 
@@ -23,10 +23,10 @@
 main(int argc, char **argv)
 {
 	DUMB_IT_SIGRENDERER *itren;
-	int n, sz, r, noaudio;
 	DUH_SIGRENDERER *ren;
 	sample_t **samp;
 	char *data, *t;
+	int n, sz, r;
 	double pos;
 	long nsamp;
 	DUH *f;
@@ -33,12 +33,8 @@
 
 	setfcr(getfcr() & ~(FPINVAL|FPOVFL));
 
-	noaudio = 0;
 	pos = 0.0;
 	ARGBEGIN{
-	case 'n':
-		noaudio = 1;
-		break;
 	case 's':
 		pos = atof(EARGF(usage()));
 		break;
@@ -68,8 +64,6 @@
 	if((t = (char*)duh_get_tag(f, "TITLE")) != nil && *t)
 		fprint(2, "%s\n", t);
 	fprint(2, "duration: %g\n", duh_get_length(f)*RATIO/100000.0);
-	if(noaudio)
-		exits(nil);
 	ren = duh_start_sigrenderer(f, 0, 2, pos*100000.0/RATIO);
 	itren = duh_get_it_sigrenderer(ren);
 	dumb_it_set_loop_callback(itren, dumb_it_callback_terminate, nil);