michael@cadilhac.name (Michaël Cadilhac) writes:
Next, Audacity stopped segfaulting but still didn't work: it couldn't manage to configure the plugin properly.
My second idea was to allow usb_stream to fix its own rate and period_size, as in:
pcm.!usb_stream { type usb_stream period_size 128 rate 44100 card "1" }
This would be great because it would prevent PortAudio from doing lots of test (which are pretty slow). This is what I thought would work:
Basically, I tweaked the argument parsing to accept "rate" and "period_size", stored them in the snd_pcm_us_t, and used them in us_set_hw_constraint. It looks to work great with the rate, but when I set the period_size, aplay can't find a valid configuration (indeed, snd_pcm_hw_params_any(handle, params); returns an error).
Any help appreciated again!