예제 #1
0
파일: d_dac.c 프로젝트: 4nykey/rockbox
static void adc_dsp(t_adc *x, t_signal **sp)
{
    t_int i, *ip;
    t_signal **sp2;
    for (i = x->x_n, ip = x->x_vec, sp2 = sp; i--; ip++, sp2++)
    {
    	int ch = *ip - 1;
    	if ((*sp2)->s_n != DEFDACBLKSIZE)
    	    error("adc~: bad vector size");
    	else if (ch >= 0 && ch < sys_get_inchannels())
    	    dsp_add_copy(sys_soundin + DEFDACBLKSIZE*ch,
    	    	(*sp2)->s_vec, DEFDACBLKSIZE);
    	else dsp_add_zero((*sp2)->s_vec, DEFDACBLKSIZE);
    }    
}
예제 #2
0
파일: g_io.c 프로젝트: Angeldude/pure-data
static void voutlet_dsp(t_voutlet *x, t_signal **sp)
{
    t_signal *insig;
    if (!x->x_buf) return;
    insig = sp[0];
    if (x->x_justcopyout)
        dsp_add_copy(insig->s_vec, x->x_directsignal->s_vec, insig->s_n);
    else if (x->x_directsignal)
    {
            /* if we're just going to make the signal available on the
            parent patch, hand it off to the parent signal. */
        /* this is done elsewhere--> sp[0]->s_refcount++; */
        signal_setborrowed(x->x_directsignal, sp[0]);
    }
    else
        dsp_add(voutlet_perform, 3, x, insig->s_vec, insig->s_n);
}