Firstly, I am a C novice (but not a programming novice).

I've been looking at using Jack. I've read the API reference and simple_client.c and 
connection.c and (think!) I understand them. I just have a couple of questions which I 
hoped somebody could help me with. 

1. Is the 'port_type' string just an arbitrary string if I am defining my own audio 
type? (instead of using DEFAULT_AUDIO_TYPE)

2. How do I define my own audio types? For example, I wish to import 16bit stereo PCM 
data from my CD player in 1024 sample chunks. In this case, do i need to set up 2 
ports (one for each audio channel) with a buffer of 2048 bytes each? If so, how do I 
tell the jack server to feed me data encoded to 16 bits? and how do I define a port as 
belonging to a particular audio channel? If not, how do I define and use a stereo 
source?

3. When is 'process()' called (as set by 'int jack_set_process_callback(...). Is it 
when the buffer is full? If so, is it controlled by the jack server? Presumably, the 
ideal situation is that all processing is done and the program is waiting (in a loop?) 
before the 'process()' function is called, thus allowing the program to process the 
next chunk of data?

Any help at all would be welcomed.

I apologise if I have missed something obvious, in which case a quiet pointer to the 
required info would be much appreciated.

Many Thanks

Henry Gomersall

Reply via email to