Make mixer print out all of the current mixer settings by defualt

instead of making the user run a separate command for each
setting they are interested in.  Closes PR#432.
This commit is contained in:
Mike Pritchard 1996-01-31 18:01:22 +00:00
parent c22c56a0b1
commit 493f8e953b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=13803

View File

@ -90,10 +90,26 @@ main(int argc, char *argv[])
case 2:
bar = 0;
break;
case 1:
bar = -1;
break;
default:
usage();
}
if (bar < 0) {
for (foo = 0; foo < SOUND_MIXER_NRDEVICES; foo++) {
if (!((1 << foo) & devmask))
continue;
if (ioctl(baz, MIXER_READ(foo),&bar)== -1) {
perror("MIXER_READ");
continue;
}
printf("Mixer %-8s is currently set to %3d:%d\n", names[foo], bar & 0x7f, (bar >> 8) & 0x7f);
}
return(0);
}
for (foo = 0; foo < SOUND_MIXER_NRDEVICES && strcmp(names[foo], argv[1]); foo++);
if (foo >= SOUND_MIXER_NRDEVICES) {