| ok, but it might need a little bit tweak. I’ll keep at it.
========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952
> On 27 Jan 2017, at 20:29, Ed Costello wrote:
>
> Thanks Victor,
>
> I’ll test this over the weekend and let you know if there’s any issues.
> Cheers
> Ed
>
>> On 27 Jan 2017, at 18:15, Victor Lazzarini wrote:
>>
>> Following Ed’s request, I’ve made an attempt to add an async allocation mechanism
>> for opcodes, through
>>
>> csound->AuxAllocAsync(CSOUND *, size_t, AUXASYNC *);
>>
>> which uses this
>>
>> typedef struct {
>> CSOUND *csound;
>> size_t nbytes;
>> void *userData;
>> void (*notify)(void *, AUXCH *);
>> } AUXASYNC;
>>
>> so users set up their call back,
>>
>> void notify(void *userData, AUXCH *new) {
>> // userData is your dataspace
>> // new contains the newly allocated memory
>> // for you to swap with the old one
>> // in a thread-safe manner
>>
>> ...
>> }
>>
>> then, in persistent memory, have a
>>
>> AUXASYNC var;
>>
>> then set
>>
>> var.notify = notify;
>> var.userData = mydata;
>>
>> and call
>>
>> if (csound->AuxAllocAsync(csound,nbytes,&var) != CSOUND_SUCCESS)
>> csound->Warning(csound, “could not allocate asynchronously”);
>>
>> In GIT now. Hopefully it works.
>> ========================
>> Prof. Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy,
>> Maynooth University,
>> Maynooth, Co Kildare, Ireland
>> Tel: 00 353 7086936
>> Fax: 00 3 |