[linux-audio-dev] Jack API query

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: [linux-audio-dev] Jack API query
From: hgomersall_AT_blueyonder.co.uk
Date: Wed May 15 2002 - 14:17:37 EEST


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


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Wed May 15 2002 - 14:14:33 EEST