On Sun, Sep 6, 2015 at 2:45 AM Ross Bencina <rossb-li...@audiomulch.com>
wrote:

> On 6/09/2015 5:15 PM, Andrew Kelley wrote:
>
> PortAudio dumps a bunch of logging information to stdio without
> > explicitly turning logging on. Here's a simple program and the
> > corresponding output:
> > https://github.com/andrewrk/node-groove/issues/13#issuecomment-70757123
>
> Those messages are printed by ALSA, not by PortAudio. We considered
> suppressing them, but current opinion seems to be that if ALSA has
> problems it's better to log them than to suppress them. That said, it's
> an open issue:
>
> https://www.assembla.com/spaces/portaudio/tickets/163
>
> Do you have any thoughts how how best to handle ALSA's dumping messages
> to stdio?
>

I was disappointed to find ALSA lib dumping messages to stdio in libsoundio
as well, in some exceptional cases. Currently in libsoundio, however, ALSA
lib prints nothing to stdio, and I'm not sure what the difference is
between it and PortAudio since I'm not doing anything fancy to silence the
messages.

I've considered not depending on ALSA lib at all and instead communicating
directly via syscalls to the kernel (or using /dev/snd, whatever ALSA lib
does internally), but I haven't started efforts toward that yet.


> >     In particular, as far as I know, there are no problems with
> PortAudio's
> >     handling of memory allocation errors. If you know of specific cases
> of
> >     problems with this I would be *very* interested to hear about them.
> >
> >
> > Not memory, but this one is particularly striking:
> >
> >        /* FEEDBACK: I'm not sure what to do when this call fails.
> > There's nothing in the PA API to
> >         * do about failures in the callback system. */
> >        assert( !err );
>
>
> It's true, pa_mac_core.c could use some love. There is an issue on Mac
> if the hardware switches sample rates while a stream is open.
>

FWIW, libsoundio handles this situation by emitting a backend disconnected
event. So the API client must recover by destroying the stream and
re-creating it.


> I think it looks good. The only things I'd change:
>

Fixed, thanks again for the corrections.


Ross, we may have "competing" open source projects, but we're really all on
the same team here. I have a deep respect for the work you do, and you are
a pleasure to interact with.

Best regards,
Andrew
_______________________________________________
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp

Reply via email to