~pbatch/patchwerk

29ad4075bdfb21379722cbb249ab755382f4b67e — paul 1 year, 1 month ago 828e3f6
re-enabled randi

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

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

# old list
#NODES=\

M dsp/randi.c => dsp/randi.c +4 -4
@@ 10,7 10,7 @@ static void destroy(pw_node *node)

    randi = (randi_d *) pw_node_get_data(node);

    sp_randi_destroy(&randi->randi);
    sp_rline_destroy(&randi->randi);

    pw_node_cables_free(node);



@@ 31,7 31,7 @@ static void compute(pw_node *node)
        randi->randi->min = pw_cable_get(randi->p_min, i);
        randi->randi->max = pw_cable_get(randi->p_max, i);
        randi->randi->cps = pw_cable_get(randi->p_cps, i);
        sp_randi_compute(randi->sp, randi->randi, NULL, &out);
        sp_rline_compute(randi->sp, randi->randi, NULL, &out);
        pw_cable_set(randi->out, i, out);
    }
}


@@ 43,8 43,8 @@ void node_randi(sp_data *sp, pw_node *node)
    randi = malloc(sizeof(randi_d));
    randi->sp = sp;

    sp_randi_create(&randi->randi);
    sp_randi_init(sp, randi->randi);
    sp_rline_create(&randi->randi);
    sp_rline_init(sp, randi->randi);
    pw_node_cables_alloc(node, 4);

    pw_node_get_cable(node, 0, &randi->p_min);

M dsp/randi.h => dsp/randi.h +1 -1
@@ 1,7 1,7 @@
#ifndef RANDI_H
typedef struct {
    sp_data *sp;
    sp_randi *randi;
    sp_rline *randi;
    pw_cable *p_min;
    pw_cable *p_max;
    pw_cable *p_cps;

M dsp/ugen_list.h => dsp/ugen_list.h +1 -1
@@ 45,7 45,7 @@ UGEN(TYPE_BUTHP, buthp)
/* UGEN(TYPE_EQFIL, eqfil) */
UGEN(TYPE_MAYGATE, maygate)
/* UGEN(TYPE_LPF18, lpf18) */
/* UGEN(TYPE_RANDI, randi) */
UGEN(TYPE_RANDI, randi)
UGEN(TYPE_RANDH, randh)
UGEN(TYPE_BLTRIANGLE, bltriangle)
/* UGEN(TYPE_VDELAY, vdelay) */