mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-12-22 12:36:32 +01:00
Fixed bug with space in mixer device name.
This commit is contained in:
parent
adcf1ed5d2
commit
55a39d6eda
1 changed files with 2 additions and 4 deletions
|
@ -188,12 +188,10 @@ int main(int argc, char **argv)
|
||||||
} else if (sscanf(argv[i], "%d:%d", &left, &right)==2) {
|
} else if (sscanf(argv[i], "%d:%d", &left, &right)==2) {
|
||||||
} else if (sscanf(argv[i], "%d", &left)==1) {
|
} else if (sscanf(argv[i], "%d", &left)==1) {
|
||||||
right = left;
|
right = left;
|
||||||
} else if (sscanf(argv[i], "%s", device_name)==1) {
|
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, "Wrong keyword: %s\n", argv[i]);
|
strncpy(device_name, argv[i], sizeof(device_name));
|
||||||
exit(1);
|
device_name[sizeof(device_name)-1] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Mixer mixer(card,device);
|
Mixer mixer(card,device);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue