From fee63dc5f8b16a48342579baec6ebea5931eca7a Mon Sep 17 00:00:00 2001 From: ratchov Date: Sat, 31 Jul 2010 08:48:01 +0000 Subject: [PATCH] remove 2 years old compatibility mode --- usr.bin/aucat/Makefile | 4 ++-- usr.bin/aucat/aucat.1 | 31 ++----------------------------- usr.bin/aucat/aucat.c | 41 ++++------------------------------------- usr.bin/aucat/wav.h | 5 +---- 4 files changed, 9 insertions(+), 72 deletions(-) diff --git a/usr.bin/aucat/Makefile b/usr.bin/aucat/Makefile index 2d6b5ed88c2..fa6270b335f 100644 --- a/usr.bin/aucat/Makefile +++ b/usr.bin/aucat/Makefile @@ -1,8 +1,8 @@ -# $OpenBSD: Makefile,v 1.13 2010/06/04 06:15:28 ratchov Exp $ +# $OpenBSD: Makefile,v 1.14 2010/07/31 08:48:01 ratchov Exp $ PROG= aucat SRCS= aucat.c abuf.c aparams.c aproc.c dev.c midi.c file.c headers.c \ - siofile.c miofile.c sock.c pipe.c listen.c opt.c wav.c legacy.c dbg.c + siofile.c miofile.c sock.c pipe.c listen.c opt.c wav.c dbg.c MAN= aucat.1 midicat.1 LINKS= ${BINDIR}/aucat ${BINDIR}/midicat CFLAGS+= -Wall -Wstrict-prototypes -Wundef -DDEBUG diff --git a/usr.bin/aucat/aucat.1 b/usr.bin/aucat/aucat.1 index 9c77a6b3a8d..c64b27c3c5f 100644 --- a/usr.bin/aucat/aucat.1 +++ b/usr.bin/aucat/aucat.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: aucat.1,v 1.72 2010/07/06 10:45:01 jmc Exp $ +.\" $OpenBSD: aucat.1,v 1.73 2010/07/31 08:48:01 ratchov Exp $ .\" .\" Copyright (c) 2006 Alexandre Ratchov .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: July 6 2010 $ +.Dd $Mdocdate: July 31 2010 $ .Dt AUCAT 1 .Os .Sh NAME @@ -530,33 +530,6 @@ actions in the MIDI sequencer. Note that the sequencer must use .Va aucat:0 as the MTC source, i.e. the audio server, not the audio player. -.Sh LEGACY MODE -If neither -.Fl i -nor -.Fl o -are specified, -.Nm -will run in legacy mode, and won't convert sample formats or sampling rates. -In legacy mode, all options except -.Fl f -are ignored, and all other arguments are assumed to be names of files. -In legacy mode -.Nm -reads files sequentially, and writes them to the specified device. -If a Sun .au header is detected it is skipped over and not copied to -the audio device. -.Nm -will attempt to parse the format, number of channels and sample rate -from Sun .au file headers. -However, only alaw and ulaw formats are supported for .au files. -Other formats will be interpreted as ulaw. -If a Microsoft .wav header (RIFF) is detected it is interpreted -to select the right audio encoding for playback and the data chunk of the -file is copied to the audio device. -If the device does not support the encoding, -.Nm -will exit with an error. .Sh ENVIRONMENT .Bl -tag -width "AUDIODEVICE" -compact .It Ev AUDIODEVICE diff --git a/usr.bin/aucat/aucat.c b/usr.bin/aucat/aucat.c index 82b497666a4..ea1994f0e1f 100644 --- a/usr.bin/aucat/aucat.c +++ b/usr.bin/aucat/aucat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aucat.c,v 1.101 2010/07/10 12:28:17 ratchov Exp $ */ +/* $OpenBSD: aucat.c,v 1.102 2010/07/31 08:48:01 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov * @@ -430,8 +430,7 @@ aucat_main(int argc, char **argv) char base[PATH_MAX], path[PATH_MAX]; unsigned mode, rate; const char *str; - char *legacy_path; - int autostart, legacy; + int autostart; struct dev *d, *dnext; unsigned active; unsigned nsock, nfile; @@ -444,8 +443,6 @@ aucat_main(int argc, char **argv) d_flag = 0; l_flag = 0; n_flag = 0; - legacy = 1; - legacy_path = NULL; SLIST_INIT(&cfdevs); nfile = nsock = 0; @@ -495,59 +492,47 @@ aucat_main(int argc, char **argv) d_flag = 1; break; case 'n': - legacy = 0; n_flag = 1; break; case 'u': - legacy = 0; u_flag = 1; break; case 'U': - legacy = 0; unit = strtonum(optarg, 0, MIDI_MAXCTL, &str); if (str) errx(1, "%s: unit number is %s", optarg, str); break; case 'm': - legacy = 0; cs->mode = opt_mode(); cd->mode = cs->mode; break; case 'h': - legacy = 0; cs->hdr = opt_hdr(); break; case 'x': - legacy = 0; cs->xrun = opt_xrun(); break; case 'j': - legacy = 0; cs->join = opt_onoff(); break; case 't': - legacy = 0; cs->mmc = opt_mmc(); break; case 'c': - legacy = 0; opt_ch(&cs->ipar); cd->opar.cmin = cs->ipar.cmin; cd->opar.cmax = cs->ipar.cmax; break; case 'C': - legacy = 0; opt_ch(&cs->opar); cd->ipar.cmin = cs->opar.cmin; cd->ipar.cmax = cs->opar.cmax; break; case 'e': - legacy = 0; opt_enc(&cs->ipar); aparams_copyenc(&cs->opar, &cs->ipar); break; case 'r': - legacy = 0; rate = strtonum(optarg, RATE_MIN, RATE_MAX, &str); if (str) errx(1, "%s: rate is %s", optarg, str); @@ -555,49 +540,39 @@ aucat_main(int argc, char **argv) cd->ipar.rate = cd->opar.rate = rate; break; case 'v': - legacy = 0; cs->vol = strtonum(optarg, 0, MIDI_MAXCTL, &str); if (str) errx(1, "%s: volume is %s", optarg, str); break; case 'i': - legacy = 0; cfstr_add(&cd->ins, cs, optarg); nfile++; break; case 'o': - legacy = 0; cfstr_add(&cd->outs, cs, optarg); nfile++; break; case 's': - legacy = 0; cfstr_add(&cd->opts, cs, optarg); nsock++; break; case 'a': - legacy = 0; cd->hold = opt_onoff(); break; case 'q': - legacy = 0; cfmid_add(&cd->mids, optarg); break; case 'b': - legacy = 0; cd->bufsz = strtonum(optarg, 1, RATE_MAX * 5, &str); if (str) errx(1, "%s: buffer size is %s", optarg, str); break; case 'z': - legacy = 0; cd->round = strtonum(optarg, 1, SHRT_MAX, &str); if (str) errx(1, "%s: block size is %s", optarg, str); break; case 'f': - legacy = 0; - legacy_path = optarg; if (SLIST_EMPTY(&cd->opts) && SLIST_EMPTY(&cd->ins) && SLIST_EMPTY(&cd->outs)) { @@ -607,7 +582,6 @@ aucat_main(int argc, char **argv) cfdev_add(&cfdevs, cd, optarg); break; case 'l': - legacy = 0; l_flag = 1; autostart = 0; break; @@ -624,15 +598,8 @@ aucat_main(int argc, char **argv) debug_level = 1; #endif if (argc > 0) { - if (!legacy) { - aucat_usage(); - exit(1); - } - for (c = 0; c < argc; c++) - if (legacy_play(legacy_path, argv[c]) != 0) { - errx(1, "%s: could not play\n", argv[c]); - } - exit(0); + aucat_usage(); + exit(1); } /* diff --git a/usr.bin/aucat/wav.h b/usr.bin/aucat/wav.h index c929b973704..1734f2e8d45 100644 --- a/usr.bin/aucat/wav.h +++ b/usr.bin/aucat/wav.h @@ -1,4 +1,4 @@ -/* $OpenBSD: wav.h,v 1.10 2010/06/04 06:15:28 ratchov Exp $ */ +/* $OpenBSD: wav.h,v 1.11 2010/07/31 08:48:01 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov * @@ -64,9 +64,6 @@ int wav_readhdr(int, struct aparams *, off_t *, off_t *, short **); int wav_writehdr(int, struct aparams *, off_t *, off_t); void wav_conv(unsigned char *, unsigned, short *); -/* legacy */ -int legacy_play(char *, char *); - extern short wav_ulawmap[256]; extern short wav_alawmap[256]; -- 2.20.1