I'm sending a sine wave to my speakers using Visual C++ using code snipped from this program (http://www.codeproject.com/cpp/Frequency_Generator/FreqGen.zip) found at this website: http://www.codeproject.com/cpp/Frequency_Generator.asp developed by "Sergey Matveyev".
I'm getting static whenever I change the frequency of the sine wave being sent to my speakers (only momentarily, right at the moment of frequency change). Even in the FreqGen.zip program (linked to above), this static occurs. I realize that this is because the new frequency sine wave not being continuous with the trailing edge of the previous sign wave. I've read online that DDS (direct digital synthesis) is the way to fix this (makes sure that the two sine waves of different frequency are continuous). I can't afford hardware to do this for me. I found cheap ICs that could help me, but they seem excessively complicated (especially since I'm only dealing with frequencies up to 50khz). I'm hoping for a purely software (visual c++ or MATLAB) solution, but haven't found any. Does anyone have any code that could help me out?
thanks a bunch!