jack c++ API

Programming applications for making music on Linux.

Moderators: MattKingUSA, khz

User avatar
sadko4u
Established Member
Posts: 987
Joined: Mon Sep 28, 2015 9:03 pm
Has thanked: 2 times
Been thanked: 359 times

Re: jack c++ API

Post by sadko4u »

tramp wrote: Ups, Fixed Point Processing, is a very well known, and widely used dsp therm.
http://www.dspguide.com/ch28/4.htm
This is a very nice book that explains many DSP-relative things with easy words. I purchased printed one and it stays in my library.
tramp wrote: there are a couple of need usage for templates, no reason to avoid them, even, no reason to pray them.
Yes, all instruments should be used carefully. And C++ is that instrument that requires a lot of carefulness. That's why I use only limited number of C++'s features (relative to C).

Code: Select all

template <class T>
inline std::string to_string(const T& t) {
    std::stringstream ss;
    ss << t;
    return ss.str();
}
This is usual code for object-to-string serialization. But it's powerless in that case when you're trying to implement multiple variants of object-to-string serialization because you can not define two 'operator << ' for object and then say the compiler to use the selected one, so the idea of usage 'operator <<' becomes defective. But it looks out cool and nice, especially on output streams that aren't stateless (for example, if you turned on octal/hex output mode and then forget to turn it off, you will wonder about the program is printing unexpected numbers to output).

For the topic starter I still recommend to write his own C++ wrapper over JACK functions that will work predictable and wouldn't 'kick ass'.
LSP (Linux Studio Plugins) Developer and Maintainer.
Post Reply