Open PortAudio-admin opened 13 years ago
Comment by @RossBencina
My 2cents: It seems to me that PA shouldn't really block all ALSA messages or we run the risk of missing real problems.
Perhaps we could just install the error handler while probing for unknown devices? or print everything ourselves from the error handler and then suppress errors like this that we know we're causing ourselves.
Comment by @RossBencina
TRAC migration: propagating ticket status from TRAC
hey this issue still exists, it still prints undesirable warnings to the console somehow
These warning messages would be useful if the audio system were not working, but my audio system is working and every time I use the mic a stream of warnings is printed to stdrout about the sound cards not being found and being unable to open a slave.... yet the mic works, the sound works. So, if it works, what value are the warning messages?
Issue created by @RossBencina
[Trac: Originally assigned to none]
Ralph Irving submits:
Since the snd_lib_error_set_handler(AlsaErrorHandler) call was commented out in r1543 of trunk/src/hostapi/alsa/pa_linux_alsa.c The ALSA implementation now prints all ALSA lib messages to stderr, which is the default if an error handler is not defined.
Before this change all error messages from the library were hidden, now there is a flurry of messages when enumerating devices which don't exist. The FindDeviceName function does this with the predefinedNames structure at line 991 in r1605 of src/hostapi/alsa/pa_linux_alsa.c
Here is an example of the messages now displayed since this change if the current sound device doesn't support the "feature" listed in the predefined names.
Device enumeration is just one example of these ALSA lib messages output but all messages from ALSA are displayed on the console now.
Perhaps the original thought that the error handler wasn't providing any useful benefit was incorrect as mentioned in this comment in the r1543 diff;
+/** Uncommented because AlsaErrorHandler is unused for anything good yet.
I get regular inquires from users of squeezeslave worried that something is broken since this change, when in fact the messages can be ignored.
I think that perhaps the AlsaErrorHandler needs to be reinstalled with the additional changes described in the commit to avoid the seg fault of course, as this helps hide the ALSA layer from PA.