Sigrid Solveig Haflínudóttircompile stuff50243ce5 years agoHistory
49 lines · 1.0 KB · C
RawDownload
/* this file is placed in the public domain */ #include <stdlib.h>#include <math.h>#include <stdint.h>#define SK_PEAKEQ_PRIV#include "tangled/peakeq.h"#include "soundpipe.h" int sp_peakeq_create(sp_peakeq **p){    *p = malloc(sizeof(sp_peakeq));    return SP_OK;} int sp_peakeq_destroy(sp_peakeq **p){    sp_peakeq *pp;    pp = *p;    free(pp->peakeq);    free(*p);    return SP_OK;} int sp_peakeq_init(sp_data *sp, sp_peakeq *p){    p->peakeq = malloc(sizeof(sk_peakeq));    sk_peakeq_init(p->peakeq, sp->sr);    p->freq = 1000;    p->bw = 125;    p->gain  = 2;     sk_peakeq_freq(p->peakeq, p->freq);    sk_peakeq_bandwidth(p->peakeq, p->bw);    sk_peakeq_gain(p->peakeq, p->gain);    return SP_OK;} int sp_peakeq_compute(sp_data *sp, sp_peakeq *p,                         SPFLOAT *in, SPFLOAT *out){    USED(sp);     sk_peakeq_freq(p->peakeq, p->freq);    sk_peakeq_bandwidth(p->peakeq, p->bw);    sk_peakeq_gain(p->peakeq, p->gain);    *out = sk_peakeq_tick(p->peakeq, *in);    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