summaryrefslogblamecommitdiffstats
path: root/src/osc_sin.c
blob: 79a172649fb33e2a47c0e639c13243074f8fbf34 (plain) (tree)
1
2
3
4
5
6
7



                  
           
             
           




                     
                                






                                              
#include "osc.h"

osc_t OSC_sin = {
  .name = "f_sin",
  .len = 1,
  .start = 0,
  .end = 1,
};

float
osc_sin(float offset)
{
  return sin(2 * M_PI * offset);
}

float
osc_sin_next(float f, float offset)
{
  return osc_next_offset(&OSC_sin, f, offset);
}