More mixer updates and some fixes...

This commit is contained in:
Jaroslav Kysela 1999-07-22 10:49:40 +00:00
parent 32f033d03c
commit 5eab4faf04
2 changed files with 7 additions and 3 deletions

View file

@ -143,7 +143,7 @@ int soundcard_setup_merge_switches(int cardno)
continue; continue;
soundcard_setup_merge_sw(soundcard->control.switches, rsoundcard->control.switches, soundcard->no, -1, "control"); soundcard_setup_merge_sw(soundcard->control.switches, rsoundcard->control.switches, soundcard->no, -1, "control");
for (rmixer = rsoundcard->mixers; rmixer; rmixer = rmixer->next) { for (rmixer = rsoundcard->mixers; rmixer; rmixer = rmixer->next) {
for (mixer = soundcard->mixers; mixer; mixer = rmixer->next) { for (mixer = soundcard->mixers; mixer; mixer = mixer->next) {
if (!strncmp(mixer->info.name, rmixer->info.name, sizeof(mixer->info.name))) if (!strncmp(mixer->info.name, rmixer->info.name, sizeof(mixer->info.name)))
break; break;
} }
@ -350,7 +350,7 @@ int soundcard_setup_merge_data(int cardno)
if (cardno >= 0 && soundcard->no != cardno) if (cardno >= 0 && soundcard->no != cardno)
continue; continue;
for (rmixer = rsoundcard->mixers; rmixer; rmixer = rmixer->next) { for (rmixer = rsoundcard->mixers; rmixer; rmixer = rmixer->next) {
for (mixer = soundcard->mixers; mixer; mixer = rmixer->next) { for (mixer = soundcard->mixers; mixer; mixer = mixer->next) {
if (!strncmp(mixer->info.name, rmixer->info.name, sizeof(mixer->info.name))) if (!strncmp(mixer->info.name, rmixer->info.name, sizeof(mixer->info.name)))
break; break;
} }

View file

@ -1463,7 +1463,11 @@ int main(int argc, char *argv[])
break; break;
case 'd': case 'd':
case HELPID_DEVICE: case HELPID_DEVICE:
device = device; device = atoi(optarg);
if (device < 0 || device > 32) {
fprintf(stderr, "Error: device %i is invalid\n", device);
return 1;
}
break; break;
case 'q': case 'q':
case HELPID_QUIET: case HELPID_QUIET: