mirror of https://github.com/ericonr/sndio.git
When a sub-device is created (-s), check if a hardware
device was already created (-f) before trying to use the default one, otherwise all sub-devices end up attached to the default device. Noticed by peters at schwertfisch.de, thanks!
This commit is contained in:
parent
ba61afa867
commit
d5ee44fc8b
|
@ -506,9 +506,11 @@ main(int argc, char **argv)
|
||||||
dev_adjpar(d, w->mode, &w->hpar, NULL);
|
dev_adjpar(d, w->mode, &w->hpar, NULL);
|
||||||
break;
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
d = mkdev(DEFAULT_DEV, 0, bufsz, round, 1, autovol);
|
if ((d = dev_list) == NULL) {
|
||||||
mkopt(optarg, d, &rpar, &ppar,
|
d = mkdev(DEFAULT_DEV, 0, bufsz, round,
|
||||||
mode, vol, mmc, join);
|
hold, autovol);
|
||||||
|
}
|
||||||
|
mkopt(optarg, d, &rpar, &ppar, mode, vol, mmc, join);
|
||||||
/* XXX: set device rate, if never set */
|
/* XXX: set device rate, if never set */
|
||||||
break;
|
break;
|
||||||
case 'q':
|
case 'q':
|
||||||
|
|
Loading…
Reference in New Issue