Re: [LAD] Tutorial for programming with JACK

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <Linux-audio-dev@...>
Date: Wednesday, February 22, 2012 - 9:56 am

Hi experts I followed your discussion about=
JACK API tutorial.Actually i am beginner_from_zero in JACK prog=
ramming. Long long time ago i writed small JACK =
client, but i gotta problems withx-runs and lost connections, an=
d i not unterstood why. Even if i read all this =
stuff, without tutorial and step_by_step examplesi can not progr=
amming stable JACK client.http://jackaudio.org/files/docs/html/g=
roup__ClientFunctions.html I found example =
https://github.com/harryhaaren/Linux-Audio-Programming-Documenta=
tion/blob/master/jackClient/jackClient.cppbut i have some beginn=
er questions about it. Why it is written in C++ =
, not C ?  float* inputBuffer =3D (float*)j=
ack_port_get_buffer ( inputPort , nframes); float* outputBu=
ffer=3D (float*)jack_port_get_buffer ( outputPort, nframes);mean=
s "read" and "write" ? If so then why callback f=
uncprocess(jack_nframes_t nframes  )have such st=
ructure ??INPUT_READOUTPUT_WRITEPROCESSING=
?  float* inputBuffer =3D (float*)jack_por=
t_get_buffer ( inputPort , nframes); float* outputBuffer=3D=
(float*)jack_port_get_buffer ( outputPort, nframes);  for =
( i =3D 0; i < (int) nframes; i++)  { // copy data from =
input to output. Note this is not optimized for speed!  &#1=
60; outputBuffer[i] =3D inputBuffer[i];  }It mea=
ns that processed samples will go to output only @ next process() call ? Why not INPUT_READPROCE=
SSINGOUTPUT_WRITE ? How can i de=
tect (list) - all available ports:channels ?How to automatic con=
nect my client i/o ports to jackd ?  jack_l=
sp -tsystem:capture_1 32 bit float mono audiosystem:c=
apture_2 32 bit float mono audiosystem:playback_1 32 bit float m=
ono audiosystem:playback_2 32 bit float mono audio&#1=
60; What means - 32 bit float mono audio ?=
32 bit float - does JACK work with other sample formats ?mo=
no  - is it possible operate with interleaved stereo stream ?audio - what else as audio ? What about stereo=
stream ?Must i create 2 ports ausL and ausR ? <=
/div>  outputPort =3D jack_port_register ( client,&#16=
0;                     &#=
160;             "ausL",  &#1=
60;                     &=
#160;           JACK_DEFAULT_AUDIO_TYPE,                    &#16=
0;               JackPortIsOutput,=
                    =
                0 );&#16=
0; outputPort =3D jack_port_register ( client,    &#16=
0;                     &#=
160;         "ausR",      &#1=
60;                     &=
#160;       JACK_DEFAULT_AUDIO_TYPE,   =
                    &#16=
0;           JackPortIsOutput,  &#=
160;                     =
            0 );If so, then how to=
write data and sync both seperate(d) channels?With interleaved =
stream i do not care about sync between channels. Tnx in advance @ all.Alfs Kurmis <=
br /> > Which leads me to my next que=
stion: are most JACK applications > written in C/C++? I understa=
nd that programming as close to the > hardware as possible is impo=
rtant for performance, but what about > programming in a JVM langu=
age (I have Clojure in mind)? How > reasonable is that? ----

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[LAD] Tutorial for programming with JACK, Kris Calabio, (Thu Feb 16, 11:38 pm)
Re: [LAD] Tutorial for programming with JACK, Harry van Haaren, (Sat Feb 18, 2:45 pm)
Re: [LAD] Tutorial for programming with JACK, Kris Calabio, (Fri Feb 17, 2:17 pm)
Re: [LAD] Tutorial for programming with JACK, Robin Gareus, (Fri Feb 17, 3:13 pm)
Re: [LAD] Tutorial for programming with JACK, Neil C Smith, (Sat Feb 18, 11:26 am)
Re: [LAD] Tutorial for programming with JACK, Bill Gribble, (Fri Feb 17, 2:22 pm)
Re: [LAD] Tutorial for programming with JACK, , (Wed Feb 22, 9:56 am)
Re: [LAD] Tutorial for programming with JACK, Harry van Haaren, (Wed Feb 22, 1:18 pm)
Re: [LAD] Tutorial for programming with JACK, Joan Quintana, (Fri Feb 24, 10:12 am)
Re: [LAD] Tutorial for programming with JACK, Robin Gareus, (Fri Feb 24, 5:08 pm)
Re: [LAD] Tutorial for programming with JACK, Joan Quintana, (Mon Feb 27, 12:31 am)
Re: [LAD] Tutorial for programming with JACK, Emanuel Rumpf, (Thu Mar 8, 8:41 am)
Re: [LAD] Tutorial for programming with JACK, Paul Davis, (Thu Mar 8, 1:19 am)
Re: [LAD] Tutorial for programming with JACK, Harry van Haaren, (Fri Feb 24, 4:52 pm)
Re: [LAD] Tutorial for programming with JACK, Joan Quintana, (Fri Feb 24, 5:46 pm)
Re: [LAD] Tutorial for programming with JACK, Iain Duncan, (Sat Feb 25, 10:34 pm)
Re: [LAD] Tutorial for programming with JACK, Robin Gareus, (Fri Feb 24, 5:06 pm)
Re: [LAD] Tutorial for programming with JACK, Robin Gareus, (Wed Feb 22, 11:30 am)
Re: [LAD] Tutorial for programming with JACK, Patrick Shirkey, (Thu Feb 16, 11:49 pm)
Re: [LAD] Tutorial for programming with JACK, Kris Calabio, (Fri Feb 17, 12:00 am)
Re: [LAD] Tutorial for programming with JACK, Joel Roth, (Sat Feb 18, 11:06 pm)
Re: [LAD] Tutorial for programming with JACK, Patrick Shirkey, (Fri Feb 17, 12:10 am)