[Csnd-dev] Strdup and plugin.h

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Csnd-dev] Strdup and plugin.h

gsenna

Hi,

I'm looking into the file ftsamplebank.cpp. It uses OpcodeBase.hpp. When copying the filenames into the string array I see it does:

strings[i].data = csound->Strdup(csound, file);

I'm writing something similar but with plugin.h. I can't access Strdup, do I? What would be the correct way of doing it with plugin.h?

Thanks. Cheers.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd-dev] Strdup and plugin.h

Victor Lazzarini
I can add it for you. 

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 11 Apr 2017, at 20:56, Guillermo Senna <[hidden email]> wrote:

Hi,

I'm looking into the file ftsamplebank.cpp. It uses OpcodeBase.hpp. When copying the filenames into the string array I see it does:

strings[i].data = csound->Strdup(csound, file);

I'm writing something similar but with plugin.h. I can't access Strdup, do I? What would be the correct way of doing it with plugin.h?

Thanks. Cheers.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd-dev] Strdup and plugin.h

gsenna
If it's not too much trouble that'd be great Victor!


On 11/04/17 17:12, Victor Lazzarini wrote:

> I can add it for you.
>
> Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy
> Maynooth University
> Ireland
>
> On 11 Apr 2017, at 20:56, Guillermo Senna <[hidden email]<mailto:[hidden email]>> wrote:
>
>
> Hi,
>
> I'm looking into the file ftsamplebank.cpp. It uses OpcodeBase.hpp. When copying the filenames into the string array I see it does:
>
> strings[i].data = csound->Strdup(csound, file);
>
> I'm writing something similar but with plugin.h. I can't access Strdup, do I? What would be the correct way of doing it with plugin.h?
>
> Thanks. Cheers.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd-dev] Strdup and plugin.h

Victor Lazzarini
It’s there now: you can use it in an opcode through the csound member:

newstr = csound->strdup(s)
========================
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 11 Apr 2017, at 21:19, Guillermo Senna <[hidden email]> wrote:
>
> If it's not too much trouble that'd be great Victor!
>
>
> On 11/04/17 17:12, Victor Lazzarini wrote:
>> I can add it for you.
>>
>> Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy
>> Maynooth University
>> Ireland
>>
>> On 11 Apr 2017, at 20:56, Guillermo Senna <[hidden email]<mailto:[hidden email]>> wrote:
>>
>>
>> Hi,
>>
>> I'm looking into the file ftsamplebank.cpp. It uses OpcodeBase.hpp. When copying the filenames into the string array I see it does:
>>
>> strings[i].data = csound->Strdup(csound, file);
>>
>> I'm writing something similar but with plugin.h. I can't access Strdup, do I? What would be the correct way of doing it with plugin.h?
>>
>> Thanks. Cheers.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd-dev] Strdup and plugin.h

Victor Lazzarini
You can see the updated reference for this here:
http://vlazzarini.github.io/cpof/
========================
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 11 Apr 2017, at 21:29, Victor Lazzarini <[hidden email]> wrote:
>
> It’s there now: you can use it in an opcode through the csound member:
>
> newstr = csound->strdup(s)
> ========================
> 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 11 Apr 2017, at 21:19, Guillermo Senna <[hidden email]> wrote:
>>
>> If it's not too much trouble that'd be great Victor!
>>
>>
>> On 11/04/17 17:12, Victor Lazzarini wrote:
>>> I can add it for you.
>>>
>>> Victor Lazzarini
>>> Dean of Arts, Celtic Studies, and Philosophy
>>> Maynooth University
>>> Ireland
>>>
>>> On 11 Apr 2017, at 20:56, Guillermo Senna <[hidden email]<mailto:[hidden email]>> wrote:
>>>
>>>
>>> Hi,
>>>
>>> I'm looking into the file ftsamplebank.cpp. It uses OpcodeBase.hpp. When copying the filenames into the string array I see it does:
>>>
>>> strings[i].data = csound->Strdup(csound, file);
>>>
>>> I'm writing something similar but with plugin.h. I can't access Strdup, do I? What would be the correct way of doing it with plugin.h?
>>>
>>> Thanks. Cheers.
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd-dev] Strdup and plugin.h

gsenna
In reply to this post by Victor Lazzarini
Thanks Victor!

Unfortunately I'm still leaking memory. Could it be from csound->strdup
or because I git pulled? Valgrind has some "lost records" including
strdup but I don't think it's the same strdup. I'll keep testing.

==9926== 20 bytes in 1 blocks are possibly lost in loss record 30 of 194
==9926==    at 0x4C2CB3F: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==9926==    by 0x5665BF9: strdup (strdup.c:42)
==9926==    by 0x10B09F23: ??? (in
/usr/lib/x86_64-linux-gnu/libasound.so.2.0.0)
==9926==    by 0x10B1FFF7: ??? (in
/usr/lib/x86_64-linux-gnu/libasound.so.2.0.0)
==9926==    by 0x10B20687: ??? (in
/usr/lib/x86_64-linux-gnu/libasound.so.2.0.0)
==9926==    by 0x10B22AA6: snd_pcm_open (in
/usr/lib/x86_64-linux-gnu/libasound.so.2.0.0)
==9926==    by 0x108CC472: ???
==9926==    by 0x108CD4E3: ???
==9926==    by 0x108CD572: ???
==9926==    by 0x4EB6DB7: sfopenout (in /usr/local/lib/libcsound64.so.6.0)
==9926==    by 0x4EA410B: musmon (in /usr/local/lib/libcsound64.so.6.0)
==9926==    by 0x5016B0A: csoundStart (in /usr/local/lib/libcsound64.so.6.0)


On 11/04/17 17:29, Victor Lazzarini wrote:

> It’s there now: you can use it in an opcode through the csound member:
>
> newstr = csound->strdup(s)
> ========================
> 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 11 Apr 2017, at 21:19, Guillermo Senna <[hidden email]> wrote:
>>
>> If it's not too much trouble that'd be great Victor!
>>
>>
>> On 11/04/17 17:12, Victor Lazzarini wrote:
>>> I can add it for you.
>>>
>>> Victor Lazzarini
>>> Dean of Arts, Celtic Studies, and Philosophy
>>> Maynooth University
>>> Ireland
>>>
>>> On 11 Apr 2017, at 20:56, Guillermo Senna <[hidden email]<mailto:[hidden email]>> wrote:
>>>
>>>
>>> Hi,
>>>
>>> I'm looking into the file ftsamplebank.cpp. It uses OpcodeBase.hpp. When copying the filenames into the string array I see it does:
>>>
>>> strings[i].data = csound->Strdup(csound, file);
>>>
>>> I'm writing something similar but with plugin.h. I can't access Strdup, do I? What would be the correct way of doing it with plugin.h?
>>>
>>> Thanks. Cheers.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd-dev] Strdup and plugin.h

gsenna
In reply to this post by Victor Lazzarini
Yeah, today I found the README.md in github. It's of great help.


On 11/04/17 17:52, Victor Lazzarini wrote:

> You can see the updated reference for this here:
> http://vlazzarini.github.io/cpof/
> ========================
> 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 11 Apr 2017, at 21:29, Victor Lazzarini <[hidden email]> wrote:
>>
>> It’s there now: you can use it in an opcode through the csound member:
>>
>> newstr = csound->strdup(s)
>> ========================
>> 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 11 Apr 2017, at 21:19, Guillermo Senna <[hidden email]> wrote:
>>>
>>> If it's not too much trouble that'd be great Victor!
>>>
>>>
>>> On 11/04/17 17:12, Victor Lazzarini wrote:
>>>> I can add it for you.
>>>>
>>>> Victor Lazzarini
>>>> Dean of Arts, Celtic Studies, and Philosophy
>>>> Maynooth University
>>>> Ireland
>>>>
>>>> On 11 Apr 2017, at 20:56, Guillermo Senna <[hidden email]<mailto:[hidden email]>> wrote:
>>>>
>>>>
>>>> Hi,
>>>>
>>>> I'm looking into the file ftsamplebank.cpp. It uses OpcodeBase.hpp. When copying the filenames into the string array I see it does:
>>>>
>>>> strings[i].data = csound->Strdup(csound, file);
>>>>
>>>> I'm writing something similar but with plugin.h. I can't access Strdup, do I? What would be the correct way of doing it with plugin.h?
>>>>
>>>> Thanks. Cheers.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd-dev] Strdup and plugin.h

gsenna
In reply to this post by Victor Lazzarini
So, Csound is leaking memory according to valgrind. The following
instrument is showing 104 records definitely lost:

instr 1
    print 42
endin



On 11/04/17 17:29, Victor Lazzarini wrote:

> It’s there now: you can use it in an opcode through the csound member:
>
> newstr = csound->strdup(s)
> ========================
> 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 11 Apr 2017, at 21:19, Guillermo Senna <[hidden email]> wrote:
>>
>> If it's not too much trouble that'd be great Victor!
>>
>>
>> On 11/04/17 17:12, Victor Lazzarini wrote:
>>> I can add it for you.
>>>
>>> Victor Lazzarini
>>> Dean of Arts, Celtic Studies, and Philosophy
>>> Maynooth University
>>> Ireland
>>>
>>> On 11 Apr 2017, at 20:56, Guillermo Senna <[hidden email]<mailto:[hidden email]>> wrote:
>>>
>>>
>>> Hi,
>>>
>>> I'm looking into the file ftsamplebank.cpp. It uses OpcodeBase.hpp. When copying the filenames into the string array I see it does:
>>>
>>> strings[i].data = csound->Strdup(csound, file);
>>>
>>> I'm writing something similar but with plugin.h. I can't access Strdup, do I? What would be the correct way of doing it with plugin.h?
>>>
>>> Thanks. Cheers.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd-dev] Strdup and plugin.h

Victor Lazzarini
In reply to this post by gsenna
I don’t know. The strdup is the same as in the other opcode you pointed out.
========================
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 11 Apr 2017, at 21:59, Guillermo Senna <[hidden email]> wrote:
>
> Thanks Victor!
>
> Unfortunately I'm still leaking memory. Could it be from csound->strdup
> or because I git pulled? Valgrind has some "lost records" including
> strdup but I don't think it's the same strdup. I'll keep testing.
>
> ==9926== 20 bytes in 1 blocks are possibly lost in loss record 30 of 194
> ==9926==    at 0x4C2CB3F: malloc (in
> /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==9926==    by 0x5665BF9: strdup (strdup.c:42)
> ==9926==    by 0x10B09F23: ??? (in
> /usr/lib/x86_64-linux-gnu/libasound.so.2.0.0)
> ==9926==    by 0x10B1FFF7: ??? (in
> /usr/lib/x86_64-linux-gnu/libasound.so.2.0.0)
> ==9926==    by 0x10B20687: ??? (in
> /usr/lib/x86_64-linux-gnu/libasound.so.2.0.0)
> ==9926==    by 0x10B22AA6: snd_pcm_open (in
> /usr/lib/x86_64-linux-gnu/libasound.so.2.0.0)
> ==9926==    by 0x108CC472: ???
> ==9926==    by 0x108CD4E3: ???
> ==9926==    by 0x108CD572: ???
> ==9926==    by 0x4EB6DB7: sfopenout (in /usr/local/lib/libcsound64.so.6.0)
> ==9926==    by 0x4EA410B: musmon (in /usr/local/lib/libcsound64.so.6.0)
> ==9926==    by 0x5016B0A: csoundStart (in /usr/local/lib/libcsound64.so.6.0)
>
>
> On 11/04/17 17:29, Victor Lazzarini wrote:
>> It’s there now: you can use it in an opcode through the csound member:
>>
>> newstr = csound->strdup(s)
>> ========================
>> 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 11 Apr 2017, at 21:19, Guillermo Senna <[hidden email]> wrote:
>>>
>>> If it's not too much trouble that'd be great Victor!
>>>
>>>
>>> On 11/04/17 17:12, Victor Lazzarini wrote:
>>>> I can add it for you.
>>>>
>>>> Victor Lazzarini
>>>> Dean of Arts, Celtic Studies, and Philosophy
>>>> Maynooth University
>>>> Ireland
>>>>
>>>> On 11 Apr 2017, at 20:56, Guillermo Senna <[hidden email]<mailto:[hidden email]>> wrote:
>>>>
>>>>
>>>> Hi,
>>>>
>>>> I'm looking into the file ftsamplebank.cpp. It uses OpcodeBase.hpp. When copying the filenames into the string array I see it does:
>>>>
>>>> strings[i].data = csound->Strdup(csound, file);
>>>>
>>>> I'm writing something similar but with plugin.h. I can't access Strdup, do I? What would be the correct way of doing it with plugin.h?
>>>>
>>>> Thanks. Cheers.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd-dev] Strdup and plugin.h

Victor Lazzarini
In reply to this post by gsenna
It might not be in Csound. It could be in the alsa library or somewhere else. In your previous example,
valgrind was pointing to libasound:

==9926== 20 bytes in 1 blocks are possibly lost in loss record 30 of 194
==9926==    at 0x4C2CB3F: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==9926==    by 0x5665BF9: strdup (strdup.c:42)
==9926==    by 0x10B09F23: ??? (in
/usr/lib/x86_64-linux-gnu/libasound.so.2.0.0)
==9926==    by 0x10B1FFF7: ??? (in
/usr/lib/x86_64-linux-gnu/libasound.so.2.0.0)
==9926==    by 0x10B20687: ??? (in
/usr/lib/x86_64-linux-gnu/libasound.so.2.0.0)
==9926==    by 0x10B22AA6: snd_pcm_open (in
/usr/lib/x86_64-linux-gnu/libasound.so.2.0.0)

========================
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 11 Apr 2017, at 22:03, Guillermo Senna <[hidden email]> wrote:
>
> So, Csound is leaking memory according to valgrind. The following
> instrument is showing 104 records definitely lost:
>
> instr 1
>    print 42
> endin
>
>
>
> On 11/04/17 17:29, Victor Lazzarini wrote:
>> It’s there now: you can use it in an opcode through the csound member:
>>
>> newstr = csound->strdup(s)
>> ========================
>> 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 11 Apr 2017, at 21:19, Guillermo Senna <[hidden email]> wrote:
>>>
>>> If it's not too much trouble that'd be great Victor!
>>>
>>>
>>> On 11/04/17 17:12, Victor Lazzarini wrote:
>>>> I can add it for you.
>>>>
>>>> Victor Lazzarini
>>>> Dean of Arts, Celtic Studies, and Philosophy
>>>> Maynooth University
>>>> Ireland
>>>>
>>>> On 11 Apr 2017, at 20:56, Guillermo Senna <[hidden email]<mailto:[hidden email]>> wrote:
>>>>
>>>>
>>>> Hi,
>>>>
>>>> I'm looking into the file ftsamplebank.cpp. It uses OpcodeBase.hpp. When copying the filenames into the string array I see it does:
>>>>
>>>> strings[i].data = csound->Strdup(csound, file);
>>>>
>>>> I'm writing something similar but with plugin.h. I can't access Strdup, do I? What would be the correct way of doing it with plugin.h?
>>>>
>>>> Thanks. Cheers.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd-dev] Strdup and plugin.h

gsenna
Yes, every lost record mentions libasound.

It wasn't there yesterday while I was trying to access Strdup so it
might be the Ubuntu update this morning (if you think it wasn't the git
pull from the Csound repo).

Btw, csound->strdup works great for me. Thanks again!


On 11/04/17 19:04, Victor Lazzarini wrote:

> It might not be in Csound. It could be in the alsa library or somewhere else. In your previous example,
> valgrind was pointing to libasound:
>
> ==9926== 20 bytes in 1 blocks are possibly lost in loss record 30 of 194
> ==9926==    at 0x4C2CB3F: malloc (in
> /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==9926==    by 0x5665BF9: strdup (strdup.c:42)
> ==9926==    by 0x10B09F23: ??? (in
> /usr/lib/x86_64-linux-gnu/libasound.so.2.0.0)
> ==9926==    by 0x10B1FFF7: ??? (in
> /usr/lib/x86_64-linux-gnu/libasound.so.2.0.0)
> ==9926==    by 0x10B20687: ??? (in
> /usr/lib/x86_64-linux-gnu/libasound.so.2.0.0)
> ==9926==    by 0x10B22AA6: snd_pcm_open (in
> /usr/lib/x86_64-linux-gnu/libasound.so.2.0.0)
>
> ========================
> 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 11 Apr 2017, at 22:03, Guillermo Senna <[hidden email]> wrote:
>>
>> So, Csound is leaking memory according to valgrind. The following
>> instrument is showing 104 records definitely lost:
>>
>> instr 1
>>    print 42
>> endin
>>
>>
>>
>> On 11/04/17 17:29, Victor Lazzarini wrote:
>>> It’s there now: you can use it in an opcode through the csound member:
>>>
>>> newstr = csound->strdup(s)
>>> ========================
>>> 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 11 Apr 2017, at 21:19, Guillermo Senna <[hidden email]> wrote:
>>>>
>>>> If it's not too much trouble that'd be great Victor!
>>>>
>>>>
>>>> On 11/04/17 17:12, Victor Lazzarini wrote:
>>>>> I can add it for you.
>>>>>
>>>>> Victor Lazzarini
>>>>> Dean of Arts, Celtic Studies, and Philosophy
>>>>> Maynooth University
>>>>> Ireland
>>>>>
>>>>> On 11 Apr 2017, at 20:56, Guillermo Senna <[hidden email]<mailto:[hidden email]>> wrote:
>>>>>
>>>>>
>>>>> Hi,
>>>>>
>>>>> I'm looking into the file ftsamplebank.cpp. It uses OpcodeBase.hpp. When copying the filenames into the string array I see it does:
>>>>>
>>>>> strings[i].data = csound->Strdup(csound, file);
>>>>>
>>>>> I'm writing something similar but with plugin.h. I can't access Strdup, do I? What would be the correct way of doing it with plugin.h?
>>>>>
>>>>> Thanks. Cheers.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd-dev] Strdup and plugin.h

Victor Lazzarini
No, I don’t think we changed anything in memory allocation lately.
========================
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 11 Apr 2017, at 23:24, Guillermo Senna <[hidden email]> wrote:
>
> Yes, every lost record mentions libasound.
>
> It wasn't there yesterday while I was trying to access Strdup so it
> might be the Ubuntu update this morning (if you think it wasn't the git
> pull from the Csound repo).
>
> Btw, csound->strdup works great for me. Thanks again!
>
>
> On 11/04/17 19:04, Victor Lazzarini wrote:
>> It might not be in Csound. It could be in the alsa library or somewhere else. In your previous example,
>> valgrind was pointing to libasound:
>>
>> ==9926== 20 bytes in 1 blocks are possibly lost in loss record 30 of 194
>> ==9926==    at 0x4C2CB3F: malloc (in
>> /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
>> ==9926==    by 0x5665BF9: strdup (strdup.c:42)
>> ==9926==    by 0x10B09F23: ??? (in
>> /usr/lib/x86_64-linux-gnu/libasound.so.2.0.0)
>> ==9926==    by 0x10B1FFF7: ??? (in
>> /usr/lib/x86_64-linux-gnu/libasound.so.2.0.0)
>> ==9926==    by 0x10B20687: ??? (in
>> /usr/lib/x86_64-linux-gnu/libasound.so.2.0.0)
>> ==9926==    by 0x10B22AA6: snd_pcm_open (in
>> /usr/lib/x86_64-linux-gnu/libasound.so.2.0.0)
>>
>> ========================
>> 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 11 Apr 2017, at 22:03, Guillermo Senna <[hidden email]> wrote:
>>>
>>> So, Csound is leaking memory according to valgrind. The following
>>> instrument is showing 104 records definitely lost:
>>>
>>> instr 1
>>>   print 42
>>> endin
>>>
>>>
>>>
>>> On 11/04/17 17:29, Victor Lazzarini wrote:
>>>> It’s there now: you can use it in an opcode through the csound member:
>>>>
>>>> newstr = csound->strdup(s)
>>>> ========================
>>>> 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 11 Apr 2017, at 21:19, Guillermo Senna <[hidden email]> wrote:
>>>>>
>>>>> If it's not too much trouble that'd be great Victor!
>>>>>
>>>>>
>>>>> On 11/04/17 17:12, Victor Lazzarini wrote:
>>>>>> I can add it for you.
>>>>>>
>>>>>> Victor Lazzarini
>>>>>> Dean of Arts, Celtic Studies, and Philosophy
>>>>>> Maynooth University
>>>>>> Ireland
>>>>>>
>>>>>> On 11 Apr 2017, at 20:56, Guillermo Senna <[hidden email]<mailto:[hidden email]>> wrote:
>>>>>>
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I'm looking into the file ftsamplebank.cpp. It uses OpcodeBase.hpp. When copying the filenames into the string array I see it does:
>>>>>>
>>>>>> strings[i].data = csound->Strdup(csound, file);
>>>>>>
>>>>>> I'm writing something similar but with plugin.h. I can't access Strdup, do I? What would be the correct way of doing it with plugin.h?
>>>>>>
>>>>>> Thanks. Cheers.

Loading...