Re: [linux-audio-dev] Jack API query

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

Subject: Re: [linux-audio-dev] Jack API query
From: Richard Bown (bownie_AT_bownie.com)
Date: Wed May 15 2002 - 14:38:00 EEST


hgomersall_AT_blueyonder.co.uk wrote:

> If so, how do I tell the jack server to feed me data encoded to 16 bits?

Hi Henry,

You should try the jack development list with this request really
(cc'ing it). I'm also interested to hear about stereo in/out with
JACK myself as that's still something of a mystery to me too.

I can tell you what Paul said to me the other day regarding bit depth.
JACK uses a normalised (-1.0 to +1.0) 32-bit float for sample representation
so basically you can lift your resolution from that. JACK sets the
sample rate and then you use this normalised depth to convert your
samples to/from on the fly.

> 3. When is 'process()' called

process() is called by the JACK server whenever it needs new samples
to play or wants to push samples to you. As I put it, it's sucking
all the time - if you feed it with the right number of normalised
samples you'll get playback. Likewise, it's pushing all the time.
When you're got an input port registered take those samples and store
them as fast as you can in the format you require.

AFAICT when you create a JACK client of your application the JACK api
creates you a thread for listening out for these process() requests.
If you app doesn't have threads already it will do implicitly so
you've got to be a little careful when sharing data between what's
calling the JACK process() callback and what's dealing with the rest
of the data management in your app.

That's kind of where I've got to. Hopefully this little blurb won't
confuse you more as I'm pretty new to JACK myself. I've made some
good progress in the last couple of weeks though - the client code
(C++/STL) is all available through Rosegarden anon CVS at Sourceforge
if you're interested plus of course there's ardour and alsaplayer
with JACK code in them.

R

-- 
http://www.all-day-breakfast.com/rosegarden
http://www.bownie.com


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:34:50 EEST