On Wed, May 15, 2002 at 12:17:37 +0100, [EMAIL PROTECTED] wrote:
> 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?

In that case, you don't need to create a new type, you just convert the`
16bit ints to float and send them over two ports, left and right.

There is nothing special about stereo, you just connect to two different
ports.
 
> 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?

process() is called when there is a block available for you to process.
Your program doesn't have to wait, its process() function will just be
called by jack, when its appropriate.

Have a look at the example apps.

- Steve

Reply via email to