trivial linux sound playback

Posted by anon on Stack Overflow See other posts from Stack Overflow or by anon
Published on 2010-05-04T10:09:20Z Indexed on 2010/05/04 10:18 UTC
Read the original article Hit count: 255

Filed under:
|

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!

© Stack Overflow or respective owner

Related posts about linux

Related posts about sound