[LAD] Deciphering jack-smf-utils -- Jack MIDI stuff

M Donalies ingeniousnebbish at cox.net
Mon Feb 18 14:35:08 UTC 2013


On Monday 18 February 2013 08:33:16 Paul Davis wrote:
> On Mon, Feb 18, 2013 at 8:35 AM, M Donalies <ingeniousnebbish at cox.net>wrote:
> > On Sunday 17 February 2013 08:21:51 Paul Coccoli wrote:
> > > On Sat, Feb 16, 2013 at 10:33 PM, M Donalies <ingeniousnebbish at cox.net>
> > 
> > wrote:
> > > > process_callback() calls process_midi_output(), wherein we find:
> > > >         port_buffer = jack_port_get_buffer(output_port, nframes);
> > > > 
> > > > Why the nframes parameter? Is there a separate buffer area for each
> > > > frame?
> > > 
> > > There's a separate buffer for each port.
> > 
> > Yes, and that's the output_port arg, but what's with nframes? Why isn't
> > the function simply:  jack_port_get_buffer(output_port) ?
> 
> because the client may not want to get all the data at once.
> 
> ardour, for example, breaks up the process() cycle internally to deal with
> "global" scheduled events. so it may ask for the first N frames, then
> another M, then another P frames until everything is done.

Oh, I see. process_callback() is called once every N frames, where N depends 
upon user settings for latency, etc. I was mistakenly reading it as a callback 
each frame.

-- 
7:8


More information about the Linux-audio-dev mailing list