diff options
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/midiplay/midiplay.1 | 6 | ||||
-rw-r--r-- | usr.bin/midiplay/midiplay.c | 11 |
2 files changed, 12 insertions, 5 deletions
diff --git a/usr.bin/midiplay/midiplay.1 b/usr.bin/midiplay/midiplay.1 index f52d078e203..538fd45190f 100644 --- a/usr.bin/midiplay/midiplay.1 +++ b/usr.bin/midiplay/midiplay.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: midiplay.1,v 1.9 2005/03/11 22:54:06 jmc Exp $ +.\" $OpenBSD: midiplay.1,v 1.10 2005/11/06 00:56:51 jsg Exp $ .\" $NetBSD: midiplay.1,v 1.3 1998/08/13 18:26:36 augustss Exp $ .\" .\" Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ .Nd play MIDI files .Sh SYNOPSIS .Nm midiplay -.Op Fl lmqvx +.Op Fl glmqvx .Op Fl d Ar devno .Op Fl f Ar file .Op Fl t Ar tempo @@ -64,6 +64,8 @@ flag). The default is device 0. .It Fl f Ar file Specifies the name of the sequencer device. +.It Fl g +Send a ``General MIDI On'' system exclusive message to the device. .It Fl l List the possible devices without playing anything. .It Fl m diff --git a/usr.bin/midiplay/midiplay.c b/usr.bin/midiplay/midiplay.c index 0ece9086cb2..d6498c62d1e 100644 --- a/usr.bin/midiplay/midiplay.c +++ b/usr.bin/midiplay/midiplay.c @@ -1,4 +1,4 @@ -/* $OpenBSD: midiplay.c,v 1.7 2005/07/28 10:59:11 jsg Exp $ */ +/* $OpenBSD: midiplay.c,v 1.8 2005/11/06 00:56:51 jsg Exp $ */ /* $NetBSD: midiplay.c,v 1.8 1998/11/25 22:17:07 augustss Exp $ */ /* @@ -485,13 +485,14 @@ main(int argc, char **argv) int ch; int listdevs = 0; int example = 0; + int gmreset = 0; int nmidi; char *file = DEVMUSIC; struct synth_info info; FILE *f; const char *errstr; - while ((ch = getopt(argc, argv, "?d:f:lmqt:vx")) != -1) { + while ((ch = getopt(argc, argv, "?d:f:glmqt:vx")) != -1) { switch (ch) { case 'd': unit = strtonum(optarg, 0, INT_MAX, &errstr); @@ -501,6 +502,9 @@ main(int argc, char **argv) case 'f': file = optarg; break; + case 'g': + gmreset++; + break; case 'l': listdevs++; break; @@ -544,7 +548,8 @@ main(int argc, char **argv) } exit(0); } - midireset(); + if (gmreset) + midireset(); if (example) playdata(sample, sizeof sample, "<Gubben Noa>"); else if (argc == 0) |