-.\" $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 <alex@caoua.org>
.\"
.\" 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
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
-/* $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 <alex@caoua.org>
*
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;
d_flag = 0;
l_flag = 0;
n_flag = 0;
- legacy = 1;
- legacy_path = NULL;
SLIST_INIT(&cfdevs);
nfile = nsock = 0;
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);
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)) {
cfdev_add(&cfdevs, cd, optarg);
break;
case 'l':
- legacy = 0;
l_flag = 1;
autostart = 0;
break;
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);
}
/*
-/* $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 <alex@caoua.org>
*
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];