pouët.net

Header-Only Music

category: code [glöplog]
 
Hi all, I'm new here.

I've recently finished creating a simple header only library called TDAW, which allows for shader-like music/sound programming in C/C++, as well as some other features (It's also cross-platform). Currently the only dependency is portaudio.

A simple plucked sine wave clocks in around 1.8kb on Linux, but I'm working my hardest to try and bring this down. I'm not familiar with Windows demos, so I'm not sure how i would go about reducing the size there.

Please let me know your thoughts and bring up any criticism/ideas!
You can find the library here.

Thanks :)
added on the 2022-05-09 19:13:56 by kbx kbx
Cool idea. Looks like Intel only atm.
added on the 2022-05-10 17:14:19 by El Topo El Topo
Neat, I like the idea of header-only libs to ease demo-making. Portaudio is nice, but on Linux you could surely save some space by just spawning aplay in a subprocess and piping data to it.
Quote:
Cool idea. Looks like Intel only atm.

How so?
Quote:
Neat, I like the idea of header-only libs to ease demo-making. Portaudio is nice, but on Linux you could surely save some space by just spawning aplay in a subprocess and piping data to it.

No idea why I didn't think of that, but I'll def work that in someday.
added on the 2022-05-10 18:48:36 by kbx kbx
Quote:
Quote:


Cool idea. Looks like Intel only atm.


How so?


Code:asm( "movl $1,%eax\n" "xor %ebx,%ebx\n" "int $128\n");


This is from the example though so perhaps it's possible with other architectures too, I'm not much of a coder.
added on the 2022-05-10 21:30:53 by El Topo El Topo
It is possible to use that with other architectures, it's just plain at&t asm to stop the program. I appreciate your concern however.
added on the 2022-05-11 00:58:37 by kbx kbx

login