Re: [LAD] Tutorial for programming with JACK

From: Harry van Haaren <harryhaaren@email-addr-hidden>
Date: Wed Feb 22 2012 - 15:18:18 EET

On Wed, Feb 22, 2012 at 9:56 AM, <kallipygos@email-addr-hidden> wrote:

> Hi experts

I wouldn't concider myself an "expert"... but hello never the less :)

> Why it is written in C++ , not C ?
>
Short answer: I'm ok at C++, and not good at pure C.
Long answer: Most large audio program projects are written in C++: its
easier to compartmentalize code, splitting functionality. IMO its better
suited to writing *applications*, while pure C is better for writing
libraries due to the fact that pretty much any language has bindings to
calling (pure) C functions.

> means "read" and "write" ?
>
Robin pretty much aced those questions, so I'll skip em.

> > Which leads me to my next question: are most JACK applications
> > written in C/C++? I understand that programming as close to the
> > hardware as possible is important for performance, but what about
> > programming in a JVM language (I have Clojure in mind)? How
> > reasonable is that?
>

Memory management & threading are the two big real-time things, using a VM
complicates this.
I don't advise using it, but C++ is already my weapon of choice so I'm not
biased at all ;)

That said, my first JACK client was using Python to copy I/O buffers using
the PyJack interface.
Xruns!! but it worked... :) For serious applications I would not concider
VM languages as a serious
option, but I'm sure there's people on list that would disagree. This has
been discussed before on list,
searching the archives will provide lots of information on the topic.

HTH, -Harry

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Wed Feb 22 16:15:02 2012

This archive was generated by hypermail 2.1.8 : Wed Feb 22 2012 - 16:15:02 EET