#Is zig good (and or any better than C/C++) for audio signal analysis?

1 messages · Page 1 of 1 (latest)

pine cobalt
#

Bit of a vague question i suppose because wouldn't that depend on the library?
i'm new to audio as a whole so i don't know much but i'm weighing whether i should develop my applications in zig or stick to C for now (i would still like to learn zig anyway and i'll hopefully give it a try at some point so i know what i'm up against but i was hoping someone with some better experience than me could wager in)

long mesa
#

I would ask in #audio-dev, since most people chatting there probably arent checking out #1019652020308824145 regularly

dim stump
#

as a language it is better (I am sure you can see the bias), and it can work with any c library you'd otherwise use.

quaint slate
#

I'd use zig if you are writing your own audio processing code, c++ if you want to use existing libraries

pine cobalt
long mesa
#

The best I can give you otherwise is that Zig will be able to use C (not C++!) libraries fairly easily, so it's not like you'll be dependent on a Zig ecosystem

quaint slate
#

Zig comptime allows you to write code in a generic way, that compiles fast, it's nicer than c++ templates

But for existing libs, c++ interop is better.

#

Also, depending how much can you use it, zig has vectors and some rudimentary operations on them. Full SIMD involves inline asm, while in c++ you can use intrisics.

long mesa
#

From my limited understanding and interaction with people who know simd, the primary benefit of simd in zig is the ability to construct masks and stuff at comptime. Otherwise the support is so-so

pine cobalt
#

i prefer inline - is there an example i can see of inline in zig?

long mesa
quaint slate