shithub: riscv

Download patch

ref: 70c6dab003afbdf48fec6fc6012ccdd3aa277ac2
parent: 297bf25f612d2dde0d28d7feaae0ea381be114a7
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Feb 26 14:26:42 EST 2017

play, file: recognize midi and mus audio

--- a/rc/bin/play
+++ b/rc/bin/play
@@ -54,6 +54,10 @@
 			audio/flacdec
 		case *audio/basic*
 			audio/sundec
+		case *audio/midi*
+			games/midi -c
+		case *audio/mus*
+			games/mus | games/midi -c
 		case *pls*
 			awk 'BEGIN {FS="="} /^File/{print $2}' | play1 list plain
 		case *
@@ -68,6 +72,8 @@
 				audio/flacdec
 			case *.au *.AU
 				audio/sundec
+			case *.mid *.MID
+				games/midi -c
 			case *
 				echo $argv0: $1: unknown format: $2 >[1=2]
 			}
--- a/sys/src/cmd/file.c
+++ b/sys/src/cmd/file.c
@@ -872,6 +872,8 @@
 	"BEGIN:VCARD\n",	"vCard",		12,	"text/directory;profile=vcard",
 	"AT&T",			"DjVu document",	4,	"image/vnd.djvu",
 	"Extended module: ",	"XM audio",		17,	"audio/xm",
+	"MThd",			"midi audio",		4,	"audio/midi",
+	"MUS\x1a",		"mus audio",		4,	"audio/mus",
 	0,0,0,0
 };
 
@@ -1653,4 +1655,3 @@
 		print("face image depth %d\n", ldepth);
 	return 1;
 }
-