houbysoft
houbysoft

Reputation: 33392

Easiest way to play sound from C/C++

I have a function that generates int samples (say it's just a random function).

What's the easiest way I can route these ints to the speakers on my mac?

Note that it's important that I be able to just send ints indefinitely and it'd play it; I'm not looking for a way to write it to a WAV file and play it later or something.

Upvotes: 1

Views: 1053

Answers (1)

Jack
Jack

Reputation: 133557

I guess the simplest way is to go through SDL if you want something more crossplatform and less OSX specific. I personally used it to play raw samples and it worked like a charm.

Upvotes: 1

Related Questions