> >any > >convincing (to me) arguments why an application should not handle variable > >sized callbacks. VST process() is variable size I think as are EASI xfer > >callbacks, but clearly JACK needs constant callbacks and there is nothing > >I can do about that... > > as i understand it, VST is only variable to allow for automation. And > if you follow the discussion here about XAP and elsewhere about PTAF, > you will see that many people consider this a mistake that comes from > not using "events" in the correct way.
I agree. Events should be timestamped. But maybe that not the only reason. Certainly EASI has variable size callbacks because this is what some hardware delivers. > i feel that it should be the job of ALSA to handle period sizes. if it > doesn't do a good job, it should be fixed. if we ask for a wakeup > every time 1024 frames are available, I don't think an application should ask for a certain number of frames to wakeup. The driver should dictate when to wake up. This is the way my Audiowerk8 JACK driver works and it would get a lot more complicated if I had to add support for user-space wake up at arbitrary intervals. > and the interrupts occur at 420, > 840 and 1260 frames, then we should be woken up on the third > interrupt, process 1024 frames of data, and go back to sleep. This will not perform well since the available processing time per sample will fluctuate. > the h/w > driver should handle this, not JACK. the latency behaviour will be > just as requested by the user. IMHO JACK should be able to handle drivers that generate interrupts with variable available frames by allowing non-const callbacks. There is no way to only allow const callbacks without adding either large latency or hurting performance for driver that don't generate interrupts on available frames. It seems some soundcards, USB and possibly FireWire audio are all better served with non-const callbacks. And I still have not seen any convincing arguments that non-const callbacks are a problem for JCAK client applications. --ms
