« Return to Thread: Bug in ALUT_WAVEFORM_SINE?

Bug in ALUT_WAVEFORM_SINE?

by Dave Dribin :: Rate this Message:

Reply to Author | View in Thread

Hi,

I was looking through the code that generates a sine wave, and I think  
it's incorrect.  The [0..+1) phase should be multiplied by 2*pi not  
pi, right?

-Dave

----

Index: alut/src/alutWaveform.c
===================================================================
--- alut/src/alutWaveform.c (revision 1622)
+++ alut/src/alutWaveform.c (working copy)
@@ -20,7 +20,7 @@
  waveformSine (double UNUSED (lastPhase), double phase)
  {
    static const double pi = 3.14159265358979323846;
-  return sin (phase * pi);
+  return sin (phase * 2 * pi);
  }

  static double

_______________________________________________
Openal-devel mailing list
Openal-devel@...
http://opensource.creative.com/mailman/listinfo/openal-devel

 « Return to Thread: Bug in ALUT_WAVEFORM_SINE?