[PD] libpd: pdengine->openPatch() leads to Thread 1: EXC_BAD_ACCESS (code=1, address=0x28)
Matti Viljamaa
mviljamaa at kapsi.fi
Fri Feb 19 06:35:45 CET 2016
Ok this is fixed.
I don’t know how though, the code given given earlier works, but it seemed that somehow I had switched two of the lines to (which are in the wrong order)
>> patch = pdengine->openPatch("testpatches/sine.pd", ".”);
>> pdengine->init (/*NInChannels()*/ 0, 2, GetSampleRate());
> On 19 Feb 2016, at 07:16, Matti Viljamaa <mviljamaa at kapsi.fi> wrote:
>
> The specific line in libpd is:
>
> int canvas_suspend_dsp(void)
> {
> int rval = pd_this->pd_dspstate; <- This one gives the EXC_BAD_ACCESS
> if (rval) canvas_stop_dsp();
> return (rval);
> }
>
> in pure-data/src/g_canvas.c
>
>
>> On 19 Feb 2016, at 06:55, Matti Viljamaa <mviljamaa at kapsi.fi <mailto:mviljamaa at kapsi.fi>> wrote:
>>
>> I’m trying to test libpd out by merely having it read a patch with [osc~ 440] -> [dac~]
>>
>> I’m currently doing:
>>
>> pdengine = new pd::PdBase();
>>
>> pdengine->init (/*NInChannels()*/ 0, 2, GetSampleRate());
>>
>> patch = pdengine->openPatch("testpatches/sine.pd", ".");
>>
>> // audio processing on
>> pdengine->computeAudio(true);
>>
>> and so on.
>>
>> The line:
>>
>> patch = pdengine->openPatch("testpatches/sine.pd", ".");
>>
>> gives
>>
>> Thread 1: EXC_BAD_ACCESS (code=1, address=0x28) on pdengine->openPatch()
>>
>> the testpatches folder exists at “." and contains sine.pd.
>>
>> What’s wrong?
>> _______________________________________________
>> Pd-list at lists.iem.at <mailto:Pd-list at lists.iem.at> mailing list
>> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list <http://lists.puredata.info/listinfo/pd-list>
>
> _______________________________________________
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20160219/9b26f4b8/attachment-0001.html>
More information about the Pd-list
mailing list