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);
|
||||
break;
|
||||
case 's':
|
||||
d = mkdev(DEFAULT_DEV, 0, bufsz, round, 1, autovol);
|
||||
mkopt(optarg, d, &rpar, &ppar,
|
||||
mode, vol, mmc, join);
|
||||
if ((d = dev_list) == NULL) {
|
||||
d = mkdev(DEFAULT_DEV, 0, bufsz, round,
|
||||
hold, autovol);
|
||||
}
|
||||
mkopt(optarg, d, &rpar, &ppar, mode, vol, mmc, join);
|
||||
/* XXX: set device rate, if never set */
|
||||
break;
|
||||
case 'q':
|
||||
|
|
Loading…
Reference in New Issue