~pbatch/patchwerk

8dfbc143edd5c332b260a8d7eb6982e5730aa136 — paul 1 year, 27 days ago 21ff2ef
re-introduced dcblock

FossilOrigin-Name: f5e7d3e95f58918680985d28128eb3f4e5b81499bbce9f8b3c0e165199bd2f5d
4 files changed, 7 insertions(+), 6 deletions(-)

M dsp/config.mk
M dsp/dcblock.c
M dsp/dcblock.h
M dsp/ugen_list.h
M dsp/config.mk => dsp/config.mk +1 -0
@@ 75,6 75,7 @@ NODES=\
	slice.o\
	port.o\
	revsc.o\
	dcblock.o\

# old list
#NODES=\

M dsp/dcblock.c => dsp/dcblock.c +4 -4
@@ 14,8 14,8 @@ static void setup(pw_node *node)
    dcblock = malloc(sizeof(dcblock_d));
    dcblock->sp = sp;

    sp_dcblock_create(&dcblock->dcblock);
    sp_dcblock_init(sp, dcblock->dcblock);
    sp_dcblocker_create(&dcblock->dcblock);
    sp_dcblocker_init(sp, dcblock->dcblock);

    pw_node_cables_alloc(node, 2);
    pw_node_get_cable(node, 0, &dcblock->in);


@@ 33,7 33,7 @@ static void destroy(pw_node *node)

    dcblock = (dcblock_d *) pw_node_get_data(node);

    sp_dcblock_destroy(&dcblock->dcblock);
    sp_dcblocker_destroy(&dcblock->dcblock);

    pw_node_cables_free(node);



@@ 53,7 53,7 @@ static void compute(pw_node *node)

    for(i = 0; i < blksize; i++) {
        in = pw_cable_get(dcblock->in, i);
        sp_dcblock_compute(dcblock->sp, dcblock->dcblock, &in, &out);
        sp_dcblocker_compute(dcblock->sp, dcblock->dcblock, &in, &out);
        pw_cable_set(dcblock->out, i, out);
    }
}

M dsp/dcblock.h => dsp/dcblock.h +1 -1
@@ 1,7 1,7 @@
#ifndef DCBLOCK_H
typedef struct {
    sp_data *sp;
    sp_dcblock *dcblock;
    sp_dcblocker *dcblock;
    pw_cable *in;
    pw_cable *out;
} dcblock_d;

M dsp/ugen_list.h => dsp/ugen_list.h +1 -1
@@ 17,7 17,7 @@ UGEN(TYPE_DMETRO, dmetro)
UGEN(TYPE_TALKBOX, talkbox)
UGEN(TYPE_MTOF, mtof)
UGEN(TYPE_TICK, tick)
/* UGEN(TYPE_DCBLOCK, dcblock) */
UGEN(TYPE_DCBLOCK, dcblock)
/* UGEN(TYPE_STRESON, streson) */
UGEN(TYPE_SCALE, scale)
UGEN(TYPE_SWITCH, switch)