Simple wave generator with SDL in c++
Posted
by
Vlad Popescu
on Stack Overflow
See other posts from Stack Overflow
or by Vlad Popescu
Published on 2012-04-11T17:26:05Z
Indexed on
2012/04/11
17:29 UTC
Read the original article
Hit count: 240
i am having problems understanding how the audio part of the sdl library works now, i know that when you initialize it, you have to specify the frequency and a >>callback<< function, which i think is then called automatically at the given frequency. can anyone who worked with the sdl library write a simple example that would use sdl_audio to generate a 440 hz square wave (since it is the simplest waveform) at a sampling frequency of 44000 hz?
thanks in advance
© Stack Overflow or respective owner