prosperon/source/engine/dsp.h

25 lines
549 B
C
Raw Normal View History

2022-07-04 14:19:52 -05:00
#ifndef DSP_H
#define DSP_H
2022-07-05 15:12:48 -05:00
#include "circbuf.h"
2022-07-04 14:19:52 -05:00
void am_mod(short *a, short *b, short *c, int n);
2022-07-05 15:12:48 -05:00
struct dsp_filter {
void (*filter)(short *in, short *out, int samples, void *data);
void *data;
};
struct dsp_delay {
unsigned int ms_delay;
struct circbuf buf;
};
2022-07-04 14:19:52 -05:00
struct wav;
struct wav gen_sine(float amp, float freq, int sr, int ch);
struct wav gen_square(float amp, float freq, int sr, int ch);
struct wav gen_triangle(float amp, float freq, int sr, int ch);
2022-07-05 15:12:48 -05:00
struct wav gen_saw(float amp, float freq, int sr, int ch);
2022-07-04 14:19:52 -05:00
#endif