Thanks Mathieu!
I ran pd inside of gdb and figured out that my problem is in my dsp function, which only calls the dsp_add function.
Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 1073855264 (LWP 1420)] 0x414b197b in fftbin_tilde_dsp () from /home/wade/pd/general/fftbin~.pd_linux
So that just leaves me with the problem of figuring out the syntax of dsp_add.
Heres how I thought it worked.
This call... void fftbin_tilde_dsp(t_fftbin *ref, t_signal **sp) { dsp_add(fftbin_tilde_perform, 3, ref, sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec, sp[0]->s_n); } ...corresponds to this t_int *w. t_int *fftbin_tilde_perform(t_int *w) { t_fftbin *ref = (t_fftbin *)(w[1]); //data structure t_sample *in1 = (t_sample *)(w[2]); //1st signal/bang inlet int in2 = (int)(w[3]); //2nd float inlet t_sample *out = (t_float *)(w[4]); //float outlet int n = (int)(w[5]); //number of samples in block
Is this correct? Well, obviously not, but wheres the error?
Thanks for the help! -thewade