I have two sine oscillators and I get these two different spectrum analysis (let's disregard the slight frequency difference). Is there any deductions that can be made about the "quality", or sine approximation error or any other type of information about the sine generators derived by these graphs? Why the second is more steep? Is it normal? Which of the two is closer to the ideal sine FFT spectrum? What to read so to understand differences of this type?
The sample rate is 32k and there are 8192 frequency bins.
The code that produces this difference is:
a. (upper graph)
double freq; static double sine_rate; sine_rate += freq; *var = (long) ( sin( sine_rate ) * 2142483647.0 );
double freq; static double sine_rate; sine_rate += freq; *var = (long) ( sin( sine_rate * PI ) * 2142483647.0 );
double "freq" is provided when the function is called and can be any double between 0.0 and 1.0. The difference is the multiplication by 3.14.