The classical C program is something like:
int main() { fprintf(stderr, "hello world\n"); }
a classical OpenGL program is:
open up a window
setup ortho view
draw a colored triangle
Now, I want to do the most basic thing for sound in Linux.
I want to:
1) open up speakers
2) send a bunch of data, meant to be interpreted at 40Khz,
3) have pseakers play said data
no midi, no instruments, … just playing back raw data
What is the easiest way to do this in a C program? [and what libraries; what’s the equiv to OpenGL for sound?]
Thanks!
Sound equivalent of OpenGL is OpenAL library. It is cross-platform, whereas ALSA is Linux-specific.