Sigrid Solveig Haflínudóttircompile stuff50243ce5 years agoHistory
42 lines · 839 B · C
RawDownload
/* this file is placed in the public domain */ #include <stdlib.h>#include <math.h>#include <stdint.h>#define SK_OSC_PRIV#include "tangled/osc.h"#include "soundpipe.h" int sp_osc_create(sp_osc **osc){    *osc = malloc(sizeof(sp_osc));    return SP_OK;} int sp_osc_destroy(sp_osc **osc){    sp_osc *o;    o = *osc;    free(o->osc);    free(*osc);    return SP_OK;} int sp_osc_init(sp_data *sp, sp_osc *osc, sp_ftbl *ft, SPFLOAT iphs){    osc->freq = 440.0;    osc->amp = 0.2;    osc->osc = malloc(sizeof(sk_osc));    sk_osc_init(osc->osc, sp->sr, ft->tbl, ft->size, iphs);    return SP_OK;} int sp_osc_compute(sp_data *sp, sp_osc *osc, SPFLOAT *in, SPFLOAT *out){    USED(sp, in);     sk_osc_freq(osc->osc, osc->freq);    sk_osc_amp(osc->osc, osc->amp);    *out = sk_osc_tick(osc->osc);    return SP_OK;}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t