Silent option handling can lead to pain
Hi,
I just spent an hour or so debugging a painful, silly user error.
The problem was that I commented out some lines in /etc/libao.conf by prepending #.
Some drivers, like alsa, allow options with unknown keys to be set. Other drivers, like pulse, do not.
I had a commented out line with the alsa driver (which worked), and could not figure out why the pulse driver would mysteriously fail!
A quick fix to help stupid people like me would be to add a verbose error message in audio_out.c:
if (!device->funcs->set_option(device, options->key, options->value)) {
/* Problem setting options */
aerror("Unable to set option %s\n", options->key);
return AO_EOPENDEVICE;
}
It probably also makes sense to make sure that all audio plugins behave consistently when given invalid options.