I'm currently upgrading my app to 64-bit so I can release it to the app store.. It relies extensively on the libpd libraries.

However, libpd compiles, but crashes immediately at runtime.. The offending code is here, in d_arithmetic.c :

static void scalartimes_dsp(t_scalartimes *x, t_signal **sp)
if (sp[0]->s_n&7)
dsp_add(scalartimes_perform, 4, sp[0]->s_vec, &x->x_g,
sp[1]->s_vec, sp[0]->s_n);
dsp_add(scalartimes_perf8, 4, sp[0]->s_vec, &x->x_g,
sp[1]->s_vec, sp[0]->s_n);

dsp_add is causing an EXC_BAD_ACCESS error. Has anyone managed to compile libpd in 64 bit?

I've been through every single instance of 'malloc' in the project and added 'sizeof' to them, but it still crashes here.

UPDATE: I replaced the libpd source with the files from Miller Puckette's 64-bit update - Pd version 0.46-5, 64 bits, compiled for Macintosh OSX 10.8 or later, from this link: Miller Puckette software - but now I'm getting compile errors in z_libpd.c here:

sched_tick(sys_time + sys_time_per_dsp_tick);


int libpd_process_short(int ticks, short *inBuffer, short outBuffer) {
short_to_sample, * sample_to_short)

with the error: 'too many arguments to function call, expected 0 have 1'

I hope someone can help, I'm ready to release my app, and Apple's new standards have caused me to pull my hair out.

Thanks, Carl