#ifdef DOCUMENT Short guide for using the OSS mixer extension API ================================================= The mixer extension API is fully dynamic. It doesn't use fixexed controller numbering. Instead the controllers are identified by their name (which is different from the names displayed by ossmix). You need to read the complete controller list and pick the controller numbers from it based on the name (the numbers may change between OSS versions if new controllers are added or some existing ones removed). You can read the controller list using the following code fragment. Look at the names and pick the numbers of the controllers you need to use. You will also need the possible range of the controller. You can ignore all other information. #endif #include #include #include #include #include #define MIXER_DEVICE_NUMBER=0 int main(void) { int i, n, dev; int mixerfd=open("/dev/mixer", O_RDWR, 0); oss_mixext desc; dev=n=MIXER_DEVICE_NUMBER; if (ioctl(mixerfd, SNDCTL_MIX_NREXT, &n)==-1) { perror("SNDCTL_MIX_NREXT"); if (errno == EINVAL) fprintf(stderr, "Error: OSS version 3.9 or later is required\n"); exit(-1); } for (i=0;i