summaryrefslogtreecommitdiffstats
path: root/src/osc_sin.c
blob: 79a172649fb33e2a47c0e639c13243074f8fbf34 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#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);
}