Sigrid Solveig Haflínudóttircompile stuff50243ce5 years agoHistory
38 lines · 614 B · C
RawDownload
/* This code is placed in the public domain. */ #include <stdlib.h>#include "soundpipe.h" int sp_tgate_create(sp_tgate **p){    *p = malloc(sizeof(sp_tgate));    return SP_OK;} int sp_tgate_destroy(sp_tgate **p){    free(*p);    return SP_OK;} int sp_tgate_init(sp_data *sp, sp_tgate *p){    USED(sp);     p->time = 0;    p->timer = 0;    return SP_OK;} int sp_tgate_compute(sp_data *sp, sp_tgate *p, SPFLOAT *in, SPFLOAT *out){    *out = 0;    if(*in != 0) {        p->timer = p->time * sp->sr;    }    if(p->timer != 0) {        *out = 1;        p->timer--;    }    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