void init(int _channels, double _sampleRate) override {
        AKSoundpipeKernel::init(_channels, _sampleRate);

        sp_jcrev_create(&jcrev0);
        sp_jcrev_init(sp, jcrev0);
        sp_jcrev_create(&jcrev1);
        sp_jcrev_init(sp, jcrev1);
    }
Ejemplo n.º 2
0
int main() {
    sp_data *sp;
    sp_create(&sp);
    sp_srand(sp, 12345);
    sp->sr = SR;
    sp->len = sp->sr * LEN;
    uint32_t t, u;
    SPFLOAT in = 0, out = 0;

    sp_jcrev *unit[NUM];

    for(u = 0; u < NUM; u++) { 
        sp_jcrev_create(&unit[u]);
        sp_jcrev_init(sp, unit[u]);
    }

    for(t = 0; t < sp->len; t++) {
        for(u = 0; u < NUM; u++) sp_jcrev_compute(sp, unit[u], &in, &out);
    }

    for(u = 0; u < NUM; u++) sp_jcrev_destroy(&unit[u]);

    sp_destroy(&sp);
    return 0;
}