revert back to single device by default

This commit is contained in:
Alexandre Ratchov 2016-01-10 12:05:17 +01:00
parent cf1ebc72d3
commit f745d41032
2 changed files with 18 additions and 22 deletions

View File

@ -350,22 +350,29 @@ to which they are attached.
.Pp
If no audio devices
.Pq Fl f
are specified, first 4 audio devices are added and
settings are applied to all of them.
Similarly, if no MIDI ports
.Pq Fl q
are specified, first 8 MIDI ports are added and
settings are applied to all of them.
are specified,
settings are applied as if
the default device is specified.
If no sub-devices
.Pq Fl s
are specified for a device, a default sub-device is
created attached to it.
If a device or MIDI port
.Pq Fl fq
If a device
.Pq Fl f
is defined twice, both definitions are merged:
parameters of the first one are used but sub-devices
.Pq Fl s
of both definitions are created.
The default
.Xr sndio 7
device used by
.Nm
is
.Pa rsnd/0 ,
and the default sub-device exposed by
.Nm
is
.Pa snd/0 .
.Pp
If
.Nm

View File

@ -338,8 +338,7 @@ main(int argc, char **argv)
int c, background, unit;
int pmin, pmax, rmin, rmax;
char base[SOCKPATH_MAX], path[SOCKPATH_MAX];
char loc[32];
unsigned int mode, dup, mmc, vol, i;
unsigned int mode, dup, mmc, vol;
unsigned int hold, autovol, bufsz, round, rate;
const char *str;
struct aparams par;
@ -466,18 +465,8 @@ main(int argc, char **argv)
fputs(usagestr, stderr);
return 1;
}
if (dev_list == NULL) {
for (i = 0; i < 4; i++) {
snprintf(loc, sizeof(loc), "rsnd/%u", i);
mkdev(loc, &par, 0, bufsz, round, rate, hold, autovol);
}
}
if (port_list == NULL) {
for (i = 0; i < 8; i++) {
snprintf(loc, sizeof(loc), "rmidi/%u", i);
mkport(loc, hold);
}
}
if (dev_list == NULL)
mkdev(DEFAULT_DEV, &par, 0, bufsz, round, rate, hold, autovol);
for (d = dev_list; d != NULL; d = d->next) {
if (opt_byname("default", d->num))
continue;