<div>Hi experts</div><div> </div><div>I followed your discussion about JACK API tutorial.</div><div>Actually i am beginner_from_zero in JACK programming.</div><div> </div><div>Long long time ago i writed small JACK client, but i gotta problems with</div><div>x-runs and lost connections, and i not unterstood why.</div><div> </div><div>Even if i read all this stuff, without tutorial and step_by_step examples</div><div>i can not programming stable JACK client.</div><div>http://jackaudio.org/files/docs/html/group__ClientFunctions.html</div><div> </div><div>I found example </div><div>https://github.com/harryhaaren/Linux-Audio-Programming-Documentation/blob/master/jackClient/jackClient.cpp</div><div>but i have some beginner questions about it.</div><div> </div><div>Why it is written in C++ , not C ?</div><div> </div><div> float* inputBuffer = (float*)jack_port_get_buffer ( inputPort , nframes);</div><div> float* outputBuffer= (float*)jack_port_get_buffer ( outputPort, nframes);</div><div>means "read" and "write" ?</div><div> </div><div>If so then why callback func</div><div>process(jack_nframes_t nframes  )</div><div>have such structure ??</div><div>INPUT_READ</div><div>OUTPUT_WRITE</div><div>PROCESSING ?</div><div> </div><div> float* inputBuffer = (float*)jack_port_get_buffer ( inputPort , nframes);</div><div> float* outputBuffer= (float*)jack_port_get_buffer ( outputPort, nframes);</div><div>  for ( i = 0; i < (int) nframes; i++)</div><div>  { // copy data from input to output. Note this is not optimized for speed!</div><div>    outputBuffer[i] = inputBuffer[i];</div><div>  }</div><div>It means that processed samples will go to output only @ next process() call ?</div><div> </div><div>Why not </div><div>INPUT_READ</div><div>PROCESSING</div><div>OUTPUT_WRITE ?</div><div> </div><div>How can i detect (list) - all available ports:channels ?</div><div>How to automatic connect my client i/o ports to jackd ?</div><div> </div><div> jack_lsp -t</div><div>system:capture_1</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>32 bit float mono audio</div><div>system:capture_2</div><div><span class="Apple-tab-span" style="white-space:pre">       </span>32 bit float mono audio</div><div>system:playback_1</div><div><span class="Apple-tab-span" style="white-space:pre">      </span>32 bit float mono audio</div><div>system:playback_2</div><div><span class="Apple-tab-span" style="white-space:pre">      </span>32 bit float mono audio</div><div> </div><div> </div><div>What means - 32 bit float mono audio ?</div><div>32 bit float - does JACK work with other sample formats ?</div><div>mono  - is it possible operate with interleaved stereo stream ?</div><div>audio - what else as audio ?</div><div> </div><div>What about stereo stream ?</div><div>Must i create 2 ports ausL and ausR ?</div><div> </div><div>  outputPort = jack_port_register ( client,</div><div>                                    "ausL",</div><div>                                    JACK_DEFAULT_AUDIO_TYPE,</div><div>                                    JackPortIsOutput,</div><div>                                    0 );</div><div>  outputPort = jack_port_register ( client,</div><div>                                    "ausR",</div><div>                                    JACK_DEFAULT_AUDIO_TYPE,</div><div>                                    JackPortIsOutput,</div><div>                                    0 );</div><div>If so, then how to write data and sync both seperate(d) channels?</div><div>With interleaved stream i do not care about sync between channels.</div><div> </div><div>Tnx in advance @ all.</div><div>Alfs Kurmis</div><div> </div><br /><br /><br /> <div id="sig_upper"><br /> > Which leads me to my next question:  are most JACK applications<br /> > written in C/C++?  I understand that programming as close to the<br /> > hardware as possible is important for performance, but what about<br /> > programming in a JVM language (I have Clojure in mind)?  How<br /> > reasonable is that?</div><div id="sig_lower"><br /><br /> <br /> <br /> <br /> ----</div>