[LAD] Deciphering jack-smf-utils -- Jack MIDI stuff
ingeniousnebbish at cox.net
Sun Feb 17 03:33:50 UTC 2013
I haven't really looked at the recorder program, but the player is pretty
To make it easier for me to understand, I simplified the code somewhat (got rid
of lash stuff, reduced output to a single port, etc) so my code excerpts below
don't match up exactly with the original code.
The first question is a rather stupid one: How long is a Jack frame? If we're
running at 44.1 kHz, is a frame 1/44100 sec? Or is it some multiple? Or is it
something else? And does the process callback get called at each frame while
transport is rolling?
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?
A little later in the same function we have:
last_frame_time = jack_last_frame_time(jack_client);
Is this the time of the end of the last process cycle?
More information about the Linux-audio-dev