Presentation is loading. Please wait.

Presentation is loading. Please wait.

An Introduction to JACK

Similar presentations


Presentation on theme: "An Introduction to JACK"— Presentation transcript:

1 An Introduction to JACK
A short history and discussion of the JACK Audio Connection Kit, its operating principles, design and implementation Bob Ham

2 Outline A short history of JACK Some sound card basics The JACK system

3 A short history of JACK ALSA/OSS, LADSPA
Many applications operating only on sound card Linux-Audio-Developers list, May 2001 Discussion of low-latency, sample-synchronous inter-application data exchange system Checks indicated usable context-switching Implemented by Paul Davis

4 IRQ Sound card basics Sound card Sound card read pointer Buffer 1
Computer write pointer

5 IRQ Sound card basics Sound card Computer write pointer Buffer 1
Sound card read pointer

6 Underrun Sound card basics Sound card Computer write pointer Buffer 1
Sound card read pointer

7 The JACK system Audio devices are mmap()d Callback-based
Real-time scheduling Kernel patches No read()/write() No malloc() No mutexes Context-switch control through FIFOs

8 A JACK callback int process (jack_nframes_t nframes, void *arg) {
jack_default_audio_sample_t *out = (jack_default_audio_sample_t *) jack_port_get_buffer (output_port, nframes); jack_default_audio_sample_t *in = jack_port_get_buffer (input_port, nframes); memcpy (out, in, sizeof (jack_default_audio_sample_t) * nframes); return 0; }

9 JACK driver engine from last client jackd unix sockets to next client
RT thread libjack callback client

10 JACK driver engine jackd client 1 client 2 client 3

11 and now for some fun...


Download ppt "An Introduction to JACK"

Similar presentations


Ads by Google