Jack O'Quin wrote:
On 5/23/05, David Cournapeau <cournape(a)gmail.com>
wrote:
I tried to read the source of jamin, which
implements this kind of
scheme in io.c, but I couldn't manage to get the whole thing.
It's all in that one file. What part did you not understand?
There are 2 things which make it a bit difficult to read for me:
- the first is all the thread synchronisation stuff (I intend to
look at that problem later),
- the 2 threads thing : dsp thread, jack thread (the "more" RT one).
My main problem is the 2 threads thing. If I understand correctly, the
way it works is
1) io_init starts it all (from the point of view of module io): it
parses some cmd line options, register the callbacks to jack in 'normal
mode' (ie no dummy mode), and calls process_init. My first problem: is
dsp_block_size the *fixed* size of your actual dsp algorithm ? It looks
like it, but I am not sure as it is defined in an other module.
2) io_activate is the 2d function of io module called by main, which
register jack ports, and creates a DSP thread is necessary
3) If no dsp thread is created, once io_activate returns, jack may
begin to call io_process.
io_process is the function where the buffering which I am interested in
happens, right ? My problem is that I don't understand the DSP thread
thing, and I am a bit confused. Can I just consider the case where no
dsp thread is created to understand the buffering issue ? What is the
dsp thread for exactly ?
Sorry if I sound stupid, but my experience in C is mainly in number
crunching modules for matlab/octave extensions, and all this real time
thing is really new to me :) Big thank you for writing a well documented
code, by the way !
Cheers,
David