I want to make my SDL program sound a simple beep at a certain frequency. How do I go about doing that?
I've found a tutorial that writes to SDL's sound buffer or so, but it doesn't seem to work. (I'm using OSX "Snow Leopard")
The tutorial's code forgets to initialize Beeper::v
and generateSamples
does not work with random values of v. Try to add the line v=0;
to Beeper::Beeper()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With