Csound Csound-dev Csound-tekno Search About

[Cs-dev] Android Csound 6 - loading plugins

Date2013-06-06 14:18
FromMichael Gogins
Subject[Cs-dev] Android Csound 6 - loading plugins
AttachmentsNone  None  
I put the dynamically loaded shared libraries in assets/armeabi/OPCODE6DIR and in assets/armeabi-v7a/OPCODE6DIR.

I put in code to verify that the files actually are in these locations (they are).

I put in to code to call SetGlobalEnv("OPCODE6DIR", "/data/data/assets/aremabi-v7a") just before I call CsoundObj.startCsound().

I put in code to verify that the pathname is correct (it is).

No dice... any ideas?

Is it that the global env gets wiped out by the CsoundAndroid.Compile() call?

Is it something to do with Android permissions?

Is it something to do with dependent libraries like stlport or something?

How does one debug C code running on the device?

Regards,
Mike

Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com

Date2013-06-06 14:24
FromSteven Yi
SubjectRe: [Cs-dev] Android Csound 6 - loading plugins
Hi Michael,

I think the path may be wrong: "/data/data/assets/aremabi-v7a".  It's
been a while since I looked at the filesystem on Android, but you can
usually browse it using "adb shell" with a device connected.  The
better things though may be to use the AssetsManager to list the paths
of items in armeabi-v7a/OPCODE64DIR and then try to get the full path
to that folder from there.  Apps I think might be installed into main
memory or sd card, so we can't count on it being in a fixed folder.

Maybe check in the code and I can try it out here?

Thanks!
steven

On Thu, Jun 6, 2013 at 9:18 AM, Michael Gogins  wrote:
> I put the dynamically loaded shared libraries in assets/armeabi/OPCODE6DIR
> and in assets/armeabi-v7a/OPCODE6DIR.
>
> I put in code to verify that the files actually are in these locations (they
> are).
>
> I put in to code to call SetGlobalEnv("OPCODE6DIR",
> "/data/data/assets/aremabi-v7a") just before I call CsoundObj.startCsound().
>
> I put in code to verify that the pathname is correct (it is).
>
> No dice... any ideas?
>
> Is it that the global env gets wiped out by the CsoundAndroid.Compile()
> call?
>
> Is it something to do with Android permissions?
>
> Is it something to do with dependent libraries like stlport or something?
>
> How does one debug C code running on the device?
>
> Regards,
> Mike
>
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
> ------------------------------------------------------------------------------
> How ServiceNow helps IT people transform IT departments:
> 1. A cloud service to automate IT design, transition and operations
> 2. Dashboards that offer high-level views of enterprise services
> 3. A single system of record for all IT processes
> http://p.sf.net/sfu/servicenow-d2d-j
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-06-06 14:32
FromMichael Gogins
SubjectRe: [Cs-dev] Android Csound 6 - loading plugins
AttachmentsNone  None  

Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Thu, Jun 6, 2013 at 9:18 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
I put the dynamically loaded shared libraries in assets/armeabi/OPCODE6DIR and in assets/armeabi-v7a/OPCODE6DIR.

I put in code to verify that the files actually are in these locations (they are).

I put in to code to call SetGlobalEnv("OPCODE6DIR", "/data/data/assets/aremabi-v7a") just before I call CsoundObj.startCsound().

I put in code to verify that the pathname is correct (it is).

No dice... any ideas?

Is it that the global env gets wiped out by the CsoundAndroid.Compile() call?

Is it something to do with Android permissions?

Is it something to do with dependent libraries like stlport or something?

How does one debug C code running on the device?

Regards,
Mike

Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


Date2013-06-06 14:38
FromSteven Yi
SubjectRe: [Cs-dev] Android Csound 6 - loading plugins
Well we eliminate some variables.  I know that the fluidsynth opcode
libs built and loaded, as did the stdutil library.  I had tested and
got these both to load and run.  If you test with just those
libraries, that will eliminate some variables and just leave it to
getting the correct path.

On Thu, Jun 6, 2013 at 9:32 AM, Michael Gogins  wrote:
> There may be local shared libs I need:
>
> http://stackoverflow.com/questions/11444039/why-am-i-not-able-to-use-my-function-that-is-declared-in-so-library
>
> Regards,
> Mike
>
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Thu, Jun 6, 2013 at 9:18 AM, Michael Gogins 
> wrote:
>>
>> I put the dynamically loaded shared libraries in assets/armeabi/OPCODE6DIR
>> and in assets/armeabi-v7a/OPCODE6DIR.
>>
>> I put in code to verify that the files actually are in these locations
>> (they are).
>>
>> I put in to code to call SetGlobalEnv("OPCODE6DIR",
>> "/data/data/assets/aremabi-v7a") just before I call CsoundObj.startCsound().
>>
>> I put in code to verify that the pathname is correct (it is).
>>
>> No dice... any ideas?
>>
>> Is it that the global env gets wiped out by the CsoundAndroid.Compile()
>> call?
>>
>> Is it something to do with Android permissions?
>>
>> Is it something to do with dependent libraries like stlport or something?
>>
>> How does one debug C code running on the device?
>>
>> Regards,
>> Mike
>>
>> Michael Gogins
>> Irreducible Productions
>> http://michaelgogins.tumblr.com
>> Michael dot Gogins at gmail dot com
>
>
>
> ------------------------------------------------------------------------------
> How ServiceNow helps IT people transform IT departments:
> 1. A cloud service to automate IT design, transition and operations
> 2. Dashboards that offer high-level views of enterprise services
> 3. A single system of record for all IT processes
> http://p.sf.net/sfu/servicenow-d2d-j
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-06-06 14:42
FromMichael Gogins
SubjectRe: [Cs-dev] Android Csound 6 - loading plugins
AttachmentsNone  None  
I am already doing what say, using the asset manager and the package config tool to determine the actual pathnames and files.

Maybe the libs depend on libs that aren't installed... I can debug that though it's a bit difficult by pushing strace onto the phone with adb.

I'll check in the code this evening. Actually it may be that libsndfile.so is needed... I didn't install that one.

Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Thu, Jun 6, 2013 at 9:24 AM, Steven Yi <stevenyi@gmail.com> wrote:
Hi Michael,

I think the path may be wrong: "/data/data/assets/aremabi-v7a".  It's
been a while since I looked at the filesystem on Android, but you can
usually browse it using "adb shell" with a device connected.  The
better things though may be to use the AssetsManager to list the paths
of items in armeabi-v7a/OPCODE64DIR and then try to get the full path
to that folder from there.  Apps I think might be installed into main
memory or sd card, so we can't count on it being in a fixed folder.

Maybe check in the code and I can try it out here?

Thanks!
steven

On Thu, Jun 6, 2013 at 9:18 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
> I put the dynamically loaded shared libraries in assets/armeabi/OPCODE6DIR
> and in assets/armeabi-v7a/OPCODE6DIR.
>
> I put in code to verify that the files actually are in these locations (they
> are).
>
> I put in to code to call SetGlobalEnv("OPCODE6DIR",
> "/data/data/assets/aremabi-v7a") just before I call CsoundObj.startCsound().
>
> I put in code to verify that the pathname is correct (it is).
>
> No dice... any ideas?
>
> Is it that the global env gets wiped out by the CsoundAndroid.Compile()
> call?
>
> Is it something to do with Android permissions?
>
> Is it something to do with dependent libraries like stlport or something?
>
> How does one debug C code running on the device?
>
> Regards,
> Mike
>
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
> ------------------------------------------------------------------------------
> How ServiceNow helps IT people transform IT departments:
> 1. A cloud service to automate IT design, transition and operations
> 2. Dashboards that offer high-level views of enterprise services
> 3. A single system of record for all IT processes
> http://p.sf.net/sfu/servicenow-d2d-j
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


Date2013-06-06 14:43
FromMichael Gogins
SubjectRe: [Cs-dev] Android Csound 6 - loading plugins
AttachmentsNone  None  
Yes, I was trying with fluidsynth.

Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Thu, Jun 6, 2013 at 9:38 AM, Steven Yi <stevenyi@gmail.com> wrote:
Well we eliminate some variables.  I know that the fluidsynth opcode
libs built and loaded, as did the stdutil library.  I had tested and
got these both to load and run.  If you test with just those
libraries, that will eliminate some variables and just leave it to
getting the correct path.

On Thu, Jun 6, 2013 at 9:32 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
> There may be local shared libs I need:
>
> http://stackoverflow.com/questions/11444039/why-am-i-not-able-to-use-my-function-that-is-declared-in-so-library
>
> Regards,
> Mike
>
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Thu, Jun 6, 2013 at 9:18 AM, Michael Gogins <michael.gogins@gmail.com>
> wrote:
>>
>> I put the dynamically loaded shared libraries in assets/armeabi/OPCODE6DIR
>> and in assets/armeabi-v7a/OPCODE6DIR.
>>
>> I put in code to verify that the files actually are in these locations
>> (they are).
>>
>> I put in to code to call SetGlobalEnv("OPCODE6DIR",
>> "/data/data/assets/aremabi-v7a") just before I call CsoundObj.startCsound().
>>
>> I put in code to verify that the pathname is correct (it is).
>>
>> No dice... any ideas?
>>
>> Is it that the global env gets wiped out by the CsoundAndroid.Compile()
>> call?
>>
>> Is it something to do with Android permissions?
>>
>> Is it something to do with dependent libraries like stlport or something?
>>
>> How does one debug C code running on the device?
>>
>> Regards,
>> Mike
>>
>> Michael Gogins
>> Irreducible Productions
>> http://michaelgogins.tumblr.com
>> Michael dot Gogins at gmail dot com
>
>
>
> ------------------------------------------------------------------------------
> How ServiceNow helps IT people transform IT departments:
> 1. A cloud service to automate IT design, transition and operations
> 2. Dashboards that offer high-level views of enterprise services
> 3. A single system of record for all IT processes
> http://p.sf.net/sfu/servicenow-d2d-j
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


Date2013-06-06 14:53
FromSteven Yi
SubjectRe: [Cs-dev] Android Csound 6 - loading plugins
Just FYI, the way libcsoundandroid.so builds (or did, haven't gotten
to building since the build file changes), it linked in libsndfile
statically so that that libcsoundandroid has both libcsound and
libsndfile into one lib.  I think that was done at the time to just
make it easier to have one lib to distribute, but it'd be fine to
change that to split to libs.

Can't think of anything else that might be a hint.  I'll wait until
the code is checked in and will look at building/testing here.
Hopefully it's something simple. :)

On Thu, Jun 6, 2013 at 9:43 AM, Michael Gogins  wrote:
> Yes, I was trying with fluidsynth.
>
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Thu, Jun 6, 2013 at 9:38 AM, Steven Yi  wrote:
>>
>> Well we eliminate some variables.  I know that the fluidsynth opcode
>> libs built and loaded, as did the stdutil library.  I had tested and
>> got these both to load and run.  If you test with just those
>> libraries, that will eliminate some variables and just leave it to
>> getting the correct path.
>>
>> On Thu, Jun 6, 2013 at 9:32 AM, Michael Gogins 
>> wrote:
>> > There may be local shared libs I need:
>> >
>> >
>> > http://stackoverflow.com/questions/11444039/why-am-i-not-able-to-use-my-function-that-is-declared-in-so-library
>> >
>> > Regards,
>> > Mike
>> >
>> > Michael Gogins
>> > Irreducible Productions
>> > http://michaelgogins.tumblr.com
>> > Michael dot Gogins at gmail dot com
>> >
>> >
>> > On Thu, Jun 6, 2013 at 9:18 AM, Michael Gogins
>> > 
>> > wrote:
>> >>
>> >> I put the dynamically loaded shared libraries in
>> >> assets/armeabi/OPCODE6DIR
>> >> and in assets/armeabi-v7a/OPCODE6DIR.
>> >>
>> >> I put in code to verify that the files actually are in these locations
>> >> (they are).
>> >>
>> >> I put in to code to call SetGlobalEnv("OPCODE6DIR",
>> >> "/data/data/assets/aremabi-v7a") just before I call
>> >> CsoundObj.startCsound().
>> >>
>> >> I put in code to verify that the pathname is correct (it is).
>> >>
>> >> No dice... any ideas?
>> >>
>> >> Is it that the global env gets wiped out by the CsoundAndroid.Compile()
>> >> call?
>> >>
>> >> Is it something to do with Android permissions?
>> >>
>> >> Is it something to do with dependent libraries like stlport or
>> >> something?
>> >>
>> >> How does one debug C code running on the device?
>> >>
>> >> Regards,
>> >> Mike
>> >>
>> >> Michael Gogins
>> >> Irreducible Productions
>> >> http://michaelgogins.tumblr.com
>> >> Michael dot Gogins at gmail dot com
>> >
>> >
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > How ServiceNow helps IT people transform IT departments:
>> > 1. A cloud service to automate IT design, transition and operations
>> > 2. Dashboards that offer high-level views of enterprise services
>> > 3. A single system of record for all IT processes
>> > http://p.sf.net/sfu/servicenow-d2d-j
>> > _______________________________________________
>> > Csound-devel mailing list
>> > Csound-devel@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >
>>
>>
>> ------------------------------------------------------------------------------
>> How ServiceNow helps IT people transform IT departments:
>> 1. A cloud service to automate IT design, transition and operations
>> 2. Dashboards that offer high-level views of enterprise services
>> 3. A single system of record for all IT processes
>> http://p.sf.net/sfu/servicenow-d2d-j
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
> ------------------------------------------------------------------------------
> How ServiceNow helps IT people transform IT departments:
> 1. A cloud service to automate IT design, transition and operations
> 2. Dashboards that offer high-level views of enterprise services
> 3. A single system of record for all IT processes
> http://p.sf.net/sfu/servicenow-d2d-j
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-06-06 15:03
FromVictor Lazzarini
SubjectRe: [Cs-dev] Android Csound 6 - loading plugins
Plugins do not normally depend on libsndfile (I changed this ages ago). I think it is more likely that the
plugin library was not found. One thing to try is to use --opcode-lib= to load it from the CSDPlayer, 
placing the plugin in the same dir as the CSD (for convenience).

On 6 Jun 2013, at 14:53, Steven Yi wrote:

> Just FYI, the way libcsoundandroid.so builds (or did, haven't gotten
> to building since the build file changes), it linked in libsndfile
> statically so that that libcsoundandroid has both libcsound and
> libsndfile into one lib.  I think that was done at the time to just
> make it easier to have one lib to distribute, but it'd be fine to
> change that to split to libs.
> 
> Can't think of anything else that might be a hint.  I'll wait until
> the code is checked in and will look at building/testing here.
> Hopefully it's something simple. :)
> 
> On Thu, Jun 6, 2013 at 9:43 AM, Michael Gogins  wrote:
>> Yes, I was trying with fluidsynth.
>> 
>> Michael Gogins
>> Irreducible Productions
>> http://michaelgogins.tumblr.com
>> Michael dot Gogins at gmail dot com
>> 
>> 
>> On Thu, Jun 6, 2013 at 9:38 AM, Steven Yi  wrote:
>>> 
>>> Well we eliminate some variables.  I know that the fluidsynth opcode
>>> libs built and loaded, as did the stdutil library.  I had tested and
>>> got these both to load and run.  If you test with just those
>>> libraries, that will eliminate some variables and just leave it to
>>> getting the correct path.
>>> 
>>> On Thu, Jun 6, 2013 at 9:32 AM, Michael Gogins 
>>> wrote:
>>>> There may be local shared libs I need:
>>>> 
>>>> 
>>>> http://stackoverflow.com/questions/11444039/why-am-i-not-able-to-use-my-function-that-is-declared-in-so-library
>>>> 
>>>> Regards,
>>>> Mike
>>>> 
>>>> Michael Gogins
>>>> Irreducible Productions
>>>> http://michaelgogins.tumblr.com
>>>> Michael dot Gogins at gmail dot com
>>>> 
>>>> 
>>>> On Thu, Jun 6, 2013 at 9:18 AM, Michael Gogins
>>>> 
>>>> wrote:
>>>>> 
>>>>> I put the dynamically loaded shared libraries in
>>>>> assets/armeabi/OPCODE6DIR
>>>>> and in assets/armeabi-v7a/OPCODE6DIR.
>>>>> 
>>>>> I put in code to verify that the files actually are in these locations
>>>>> (they are).
>>>>> 
>>>>> I put in to code to call SetGlobalEnv("OPCODE6DIR",
>>>>> "/data/data/assets/aremabi-v7a") just before I call
>>>>> CsoundObj.startCsound().
>>>>> 
>>>>> I put in code to verify that the pathname is correct (it is).
>>>>> 
>>>>> No dice... any ideas?
>>>>> 
>>>>> Is it that the global env gets wiped out by the CsoundAndroid.Compile()
>>>>> call?
>>>>> 
>>>>> Is it something to do with Android permissions?
>>>>> 
>>>>> Is it something to do with dependent libraries like stlport or
>>>>> something?
>>>>> 
>>>>> How does one debug C code running on the device?
>>>>> 
>>>>> Regards,
>>>>> Mike
>>>>> 
>>>>> Michael Gogins
>>>>> Irreducible Productions
>>>>> http://michaelgogins.tumblr.com
>>>>> Michael dot Gogins at gmail dot com
>>>> 
>>>> 
>>>> 
>>>> 
>>>> ------------------------------------------------------------------------------
>>>> How ServiceNow helps IT people transform IT departments:
>>>> 1. A cloud service to automate IT design, transition and operations
>>>> 2. Dashboards that offer high-level views of enterprise services
>>>> 3. A single system of record for all IT processes
>>>> http://p.sf.net/sfu/servicenow-d2d-j
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>> 
>>> 
>>> 
>>> ------------------------------------------------------------------------------
>>> How ServiceNow helps IT people transform IT departments:
>>> 1. A cloud service to automate IT design, transition and operations
>>> 2. Dashboards that offer high-level views of enterprise services
>>> 3. A single system of record for all IT processes
>>> http://p.sf.net/sfu/servicenow-d2d-j
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> 
>> 
>> 
>> ------------------------------------------------------------------------------
>> How ServiceNow helps IT people transform IT departments:
>> 1. A cloud service to automate IT design, transition and operations
>> 2. Dashboards that offer high-level views of enterprise services
>> 3. A single system of record for all IT processes
>> http://p.sf.net/sfu/servicenow-d2d-j
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> 
> 
> ------------------------------------------------------------------------------
> How ServiceNow helps IT people transform IT departments:
> 1. A cloud service to automate IT design, transition and operations
> 2. Dashboards that offer high-level views of enterprise services
> 3. A single system of record for all IT processes
> http://p.sf.net/sfu/servicenow-d2d-j
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-06-07 01:14
FromMichael Gogins
SubjectRe: [Cs-dev] Android Csound 6 - loading plugins
AttachmentsNone  None  
I think there may be a difference in that Csound 5 has PreCompile and Csound 6 does not... Csound is acting like it forgets the global env I have set. I've booked in my code for you all to play with.

Regards,
Mike

Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Thu, Jun 6, 2013 at 10:03 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Plugins do not normally depend on libsndfile (I changed this ages ago). I think it is more likely that the
plugin library was not found. One thing to try is to use --opcode-lib= to load it from the CSDPlayer,
placing the plugin in the same dir as the CSD (for convenience).

On 6 Jun 2013, at 14:53, Steven Yi wrote:

> Just FYI, the way libcsoundandroid.so builds (or did, haven't gotten
> to building since the build file changes), it linked in libsndfile
> statically so that that libcsoundandroid has both libcsound and
> libsndfile into one lib.  I think that was done at the time to just
> make it easier to have one lib to distribute, but it'd be fine to
> change that to split to libs.
>
> Can't think of anything else that might be a hint.  I'll wait until
> the code is checked in and will look at building/testing here.
> Hopefully it's something simple. :)
>
> On Thu, Jun 6, 2013 at 9:43 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
>> Yes, I was trying with fluidsynth.
>>
>> Michael Gogins
>> Irreducible Productions
>> http://michaelgogins.tumblr.com
>> Michael dot Gogins at gmail dot com
>>
>>
>> On Thu, Jun 6, 2013 at 9:38 AM, Steven Yi <stevenyi@gmail.com> wrote:
>>>
>>> Well we eliminate some variables.  I know that the fluidsynth opcode
>>> libs built and loaded, as did the stdutil library.  I had tested and
>>> got these both to load and run.  If you test with just those
>>> libraries, that will eliminate some variables and just leave it to
>>> getting the correct path.
>>>
>>> On Thu, Jun 6, 2013 at 9:32 AM, Michael Gogins <michael.gogins@gmail.com>
>>> wrote:
>>>> There may be local shared libs I need:
>>>>
>>>>
>>>> http://stackoverflow.com/questions/11444039/why-am-i-not-able-to-use-my-function-that-is-declared-in-so-library
>>>>
>>>> Regards,
>>>> Mike
>>>>
>>>> Michael Gogins
>>>> Irreducible Productions
>>>> http://michaelgogins.tumblr.com
>>>> Michael dot Gogins at gmail dot com
>>>>
>>>>
>>>> On Thu, Jun 6, 2013 at 9:18 AM, Michael Gogins
>>>> <michael.gogins@gmail.com>
>>>> wrote:
>>>>>
>>>>> I put the dynamically loaded shared libraries in
>>>>> assets/armeabi/OPCODE6DIR
>>>>> and in assets/armeabi-v7a/OPCODE6DIR.
>>>>>
>>>>> I put in code to verify that the files actually are in these locations
>>>>> (they are).
>>>>>
>>>>> I put in to code to call SetGlobalEnv("OPCODE6DIR",
>>>>> "/data/data/assets/aremabi-v7a") just before I call
>>>>> CsoundObj.startCsound().
>>>>>
>>>>> I put in code to verify that the pathname is correct (it is).
>>>>>
>>>>> No dice... any ideas?
>>>>>
>>>>> Is it that the global env gets wiped out by the CsoundAndroid.Compile()
>>>>> call?
>>>>>
>>>>> Is it something to do with Android permissions?
>>>>>
>>>>> Is it something to do with dependent libraries like stlport or
>>>>> something?
>>>>>
>>>>> How does one debug C code running on the device?
>>>>>
>>>>> Regards,
>>>>> Mike
>>>>>
>>>>> Michael Gogins
>>>>> Irreducible Productions
>>>>> http://michaelgogins.tumblr.com
>>>>> Michael dot Gogins at gmail dot com
>>>>
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> How ServiceNow helps IT people transform IT departments:
>>>> 1. A cloud service to automate IT design, transition and operations
>>>> 2. Dashboards that offer high-level views of enterprise services
>>>> 3. A single system of record for all IT processes
>>>> http://p.sf.net/sfu/servicenow-d2d-j
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> How ServiceNow helps IT people transform IT departments:
>>> 1. A cloud service to automate IT design, transition and operations
>>> 2. Dashboards that offer high-level views of enterprise services
>>> 3. A single system of record for all IT processes
>>> http://p.sf.net/sfu/servicenow-d2d-j
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>>
>> ------------------------------------------------------------------------------
>> How ServiceNow helps IT people transform IT departments:
>> 1. A cloud service to automate IT design, transition and operations
>> 2. Dashboards that offer high-level views of enterprise services
>> 3. A single system of record for all IT processes
>> http://p.sf.net/sfu/servicenow-d2d-j
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>
> ------------------------------------------------------------------------------
> How ServiceNow helps IT people transform IT departments:
> 1. A cloud service to automate IT design, transition and operations
> 2. Dashboards that offer high-level views of enterprise services
> 3. A single system of record for all IT processes
> http://p.sf.net/sfu/servicenow-d2d-j
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


Date2013-06-07 03:53
FromSteven Yi
SubjectRe: [Cs-dev] Android Csound 6 - loading plugins
Hi Michael,

I took a quick look and had some questions:

1. This seems to be setting the libs to a folder different than what
you're looking for with the list() calls:

String OPCODE6DIR = packageInfo.applicationInfo.dataDir + "/assets/libs";

Shouldn't that be "/assets/armeabi-v7a/OPCODE6DIR" ?


2. For your generated APK file, could you to a "tar tzvf
CSDPlayer.apk" to list the contents and post it here?

Thanks!
steven

p.s. - I'm going on a long drive tomorrow and again on Sunday, so I'll
be off and on the internet the next few days.

On Thu, Jun 6, 2013 at 8:14 PM, Michael Gogins  wrote:
> I think there may be a difference in that Csound 5 has PreCompile and Csound
> 6 does not... Csound is acting like it forgets the global env I have set.
> I've booked in my code for you all to play with.
>
> Regards,
> Mike
>
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Thu, Jun 6, 2013 at 10:03 AM, Victor Lazzarini 
> wrote:
>>
>> Plugins do not normally depend on libsndfile (I changed this ages ago). I
>> think it is more likely that the
>> plugin library was not found. One thing to try is to use --opcode-lib= to
>> load it from the CSDPlayer,
>> placing the plugin in the same dir as the CSD (for convenience).
>>
>> On 6 Jun 2013, at 14:53, Steven Yi wrote:
>>
>> > Just FYI, the way libcsoundandroid.so builds (or did, haven't gotten
>> > to building since the build file changes), it linked in libsndfile
>> > statically so that that libcsoundandroid has both libcsound and
>> > libsndfile into one lib.  I think that was done at the time to just
>> > make it easier to have one lib to distribute, but it'd be fine to
>> > change that to split to libs.
>> >
>> > Can't think of anything else that might be a hint.  I'll wait until
>> > the code is checked in and will look at building/testing here.
>> > Hopefully it's something simple. :)
>> >
>> > On Thu, Jun 6, 2013 at 9:43 AM, Michael Gogins
>> >  wrote:
>> >> Yes, I was trying with fluidsynth.
>> >>
>> >> Michael Gogins
>> >> Irreducible Productions
>> >> http://michaelgogins.tumblr.com
>> >> Michael dot Gogins at gmail dot com
>> >>
>> >>
>> >> On Thu, Jun 6, 2013 at 9:38 AM, Steven Yi  wrote:
>> >>>
>> >>> Well we eliminate some variables.  I know that the fluidsynth opcode
>> >>> libs built and loaded, as did the stdutil library.  I had tested and
>> >>> got these both to load and run.  If you test with just those
>> >>> libraries, that will eliminate some variables and just leave it to
>> >>> getting the correct path.
>> >>>
>> >>> On Thu, Jun 6, 2013 at 9:32 AM, Michael Gogins
>> >>> 
>> >>> wrote:
>> >>>> There may be local shared libs I need:
>> >>>>
>> >>>>
>> >>>>
>> >>>> http://stackoverflow.com/questions/11444039/why-am-i-not-able-to-use-my-function-that-is-declared-in-so-library
>> >>>>
>> >>>> Regards,
>> >>>> Mike
>> >>>>
>> >>>> Michael Gogins
>> >>>> Irreducible Productions
>> >>>> http://michaelgogins.tumblr.com
>> >>>> Michael dot Gogins at gmail dot com
>> >>>>
>> >>>>
>> >>>> On Thu, Jun 6, 2013 at 9:18 AM, Michael Gogins
>> >>>> 
>> >>>> wrote:
>> >>>>>
>> >>>>> I put the dynamically loaded shared libraries in
>> >>>>> assets/armeabi/OPCODE6DIR
>> >>>>> and in assets/armeabi-v7a/OPCODE6DIR.
>> >>>>>
>> >>>>> I put in code to verify that the files actually are in these
>> >>>>> locations
>> >>>>> (they are).
>> >>>>>
>> >>>>> I put in to code to call SetGlobalEnv("OPCODE6DIR",
>> >>>>> "/data/data/assets/aremabi-v7a") just before I call
>> >>>>> CsoundObj.startCsound().
>> >>>>>
>> >>>>> I put in code to verify that the pathname is correct (it is).
>> >>>>>
>> >>>>> No dice... any ideas?
>> >>>>>
>> >>>>> Is it that the global env gets wiped out by the
>> >>>>> CsoundAndroid.Compile()
>> >>>>> call?
>> >>>>>
>> >>>>> Is it something to do with Android permissions?
>> >>>>>
>> >>>>> Is it something to do with dependent libraries like stlport or
>> >>>>> something?
>> >>>>>
>> >>>>> How does one debug C code running on the device?
>> >>>>>
>> >>>>> Regards,
>> >>>>> Mike
>> >>>>>
>> >>>>> Michael Gogins
>> >>>>> Irreducible Productions
>> >>>>> http://michaelgogins.tumblr.com
>> >>>>> Michael dot Gogins at gmail dot com
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>> ------------------------------------------------------------------------------
>> >>>> How ServiceNow helps IT people transform IT departments:
>> >>>> 1. A cloud service to automate IT design, transition and operations
>> >>>> 2. Dashboards that offer high-level views of enterprise services
>> >>>> 3. A single system of record for all IT processes
>> >>>> http://p.sf.net/sfu/servicenow-d2d-j
>> >>>> _______________________________________________
>> >>>> Csound-devel mailing list
>> >>>> Csound-devel@lists.sourceforge.net
>> >>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>>>
>> >>>
>> >>>
>> >>>
>> >>> ------------------------------------------------------------------------------
>> >>> How ServiceNow helps IT people transform IT departments:
>> >>> 1. A cloud service to automate IT design, transition and operations
>> >>> 2. Dashboards that offer high-level views of enterprise services
>> >>> 3. A single system of record for all IT processes
>> >>> http://p.sf.net/sfu/servicenow-d2d-j
>> >>> _______________________________________________
>> >>> Csound-devel mailing list
>> >>> Csound-devel@lists.sourceforge.net
>> >>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>> >>
>> >>
>> >>
>> >> ------------------------------------------------------------------------------
>> >> How ServiceNow helps IT people transform IT departments:
>> >> 1. A cloud service to automate IT design, transition and operations
>> >> 2. Dashboards that offer high-level views of enterprise services
>> >> 3. A single system of record for all IT processes
>> >> http://p.sf.net/sfu/servicenow-d2d-j
>> >> _______________________________________________
>> >> Csound-devel mailing list
>> >> Csound-devel@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > How ServiceNow helps IT people transform IT departments:
>> > 1. A cloud service to automate IT design, transition and operations
>> > 2. Dashboards that offer high-level views of enterprise services
>> > 3. A single system of record for all IT processes
>> > http://p.sf.net/sfu/servicenow-d2d-j
>> > _______________________________________________
>> > Csound-devel mailing list
>> > Csound-devel@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>> Dr Victor Lazzarini
>> Senior Lecturer
>> Dept. of Music
>> NUI Maynooth Ireland
>> tel.: +353 1 708 3545
>> Victor dot Lazzarini AT nuim dot ie
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> How ServiceNow helps IT people transform IT departments:
>> 1. A cloud service to automate IT design, transition and operations
>> 2. Dashboards that offer high-level views of enterprise services
>> 3. A single system of record for all IT processes
>> http://p.sf.net/sfu/servicenow-d2d-j
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
> ------------------------------------------------------------------------------
> How ServiceNow helps IT people transform IT departments:
> 1. A cloud service to automate IT design, transition and operations
> 2. Dashboards that offer high-level views of enterprise services
> 3. A single system of record for all IT processes
> http://p.sf.net/sfu/servicenow-d2d-j
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-06-07 04:19
FromMichael Gogins
SubjectRe: [Cs-dev] Android Csound 6 - loading plugins
AttachmentsNone  None  

I changed the location,  but in my tests it is consistent,  and I verify it by printing out the directory listing from the device in the debugger.

I note that if I call set global env then start Csound Then get env, it returns null. That can't be right. ..

On Jun 6, 2013 10:54 PM, "Steven Yi" <stevenyi@gmail.com> wrote:
Hi Michael,

I took a quick look and had some questions:

1. This seems to be setting the libs to a folder different than what
you're looking for with the list() calls:

String OPCODE6DIR = packageInfo.applicationInfo.dataDir + "/assets/libs";

Shouldn't that be "/assets/armeabi-v7a/OPCODE6DIR" ?


2. For your generated APK file, could you to a "tar tzvf
CSDPlayer.apk" to list the contents and post it here?

Thanks!
steven

p.s. - I'm going on a long drive tomorrow and again on Sunday, so I'll
be off and on the internet the next few days.

On Thu, Jun 6, 2013 at 8:14 PM, Michael Gogins <michael.gogins@gmail.com> wrote:
> I think there may be a difference in that Csound 5 has PreCompile and Csound
> 6 does not... Csound is acting like it forgets the global env I have set.
> I've booked in my code for you all to play with.
>
> Regards,
> Mike
>
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Thu, Jun 6, 2013 at 10:03 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie>
> wrote:
>>
>> Plugins do not normally depend on libsndfile (I changed this ages ago). I
>> think it is more likely that the
>> plugin library was not found. One thing to try is to use --opcode-lib= to
>> load it from the CSDPlayer,
>> placing the plugin in the same dir as the CSD (for convenience).
>>
>> On 6 Jun 2013, at 14:53, Steven Yi wrote:
>>
>> > Just FYI, the way libcsoundandroid.so builds (or did, haven't gotten
>> > to building since the build file changes), it linked in libsndfile
>> > statically so that that libcsoundandroid has both libcsound and
>> > libsndfile into one lib.  I think that was done at the time to just
>> > make it easier to have one lib to distribute, but it'd be fine to
>> > change that to split to libs.
>> >
>> > Can't think of anything else that might be a hint.  I'll wait until
>> > the code is checked in and will look at building/testing here.
>> > Hopefully it's something simple. :)
>> >
>> > On Thu, Jun 6, 2013 at 9:43 AM, Michael Gogins
>> > <michael.gogins@gmail.com> wrote:
>> >> Yes, I was trying with fluidsynth.
>> >>
>> >> Michael Gogins
>> >> Irreducible Productions
>> >> http://michaelgogins.tumblr.com
>> >> Michael dot Gogins at gmail dot com
>> >>
>> >>
>> >> On Thu, Jun 6, 2013 at 9:38 AM, Steven Yi <stevenyi@gmail.com> wrote:
>> >>>
>> >>> Well we eliminate some variables.  I know that the fluidsynth opcode
>> >>> libs built and loaded, as did the stdutil library.  I had tested and
>> >>> got these both to load and run.  If you test with just those
>> >>> libraries, that will eliminate some variables and just leave it to
>> >>> getting the correct path.
>> >>>
>> >>> On Thu, Jun 6, 2013 at 9:32 AM, Michael Gogins
>> >>> <michael.gogins@gmail.com>
>> >>> wrote:
>> >>>> There may be local shared libs I need:
>> >>>>
>> >>>>
>> >>>>
>> >>>> http://stackoverflow.com/questions/11444039/why-am-i-not-able-to-use-my-function-that-is-declared-in-so-library
>> >>>>
>> >>>> Regards,
>> >>>> Mike
>> >>>>
>> >>>> Michael Gogins
>> >>>> Irreducible Productions
>> >>>> http://michaelgogins.tumblr.com
>> >>>> Michael dot Gogins at gmail dot com
>> >>>>
>> >>>>
>> >>>> On Thu, Jun 6, 2013 at 9:18 AM, Michael Gogins
>> >>>> <michael.gogins@gmail.com>
>> >>>> wrote:
>> >>>>>
>> >>>>> I put the dynamically loaded shared libraries in
>> >>>>> assets/armeabi/OPCODE6DIR
>> >>>>> and in assets/armeabi-v7a/OPCODE6DIR.
>> >>>>>
>> >>>>> I put in code to verify that the files actually are in these
>> >>>>> locations
>> >>>>> (they are).
>> >>>>>
>> >>>>> I put in to code to call SetGlobalEnv("OPCODE6DIR",
>> >>>>> "/data/data/assets/aremabi-v7a") just before I call
>> >>>>> CsoundObj.startCsound().
>> >>>>>
>> >>>>> I put in code to verify that the pathname is correct (it is).
>> >>>>>
>> >>>>> No dice... any ideas?
>> >>>>>
>> >>>>> Is it that the global env gets wiped out by the
>> >>>>> CsoundAndroid.Compile()
>> >>>>> call?
>> >>>>>
>> >>>>> Is it something to do with Android permissions?
>> >>>>>
>> >>>>> Is it something to do with dependent libraries like stlport or
>> >>>>> something?
>> >>>>>
>> >>>>> How does one debug C code running on the device?
>> >>>>>
>> >>>>> Regards,
>> >>>>> Mike
>> >>>>>
>> >>>>> Michael Gogins
>> >>>>> Irreducible Productions
>> >>>>> http://michaelgogins.tumblr.com
>> >>>>> Michael dot Gogins at gmail dot com
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>> ------------------------------------------------------------------------------
>> >>>> How ServiceNow helps IT people transform IT departments:
>> >>>> 1. A cloud service to automate IT design, transition and operations
>> >>>> 2. Dashboards that offer high-level views of enterprise services
>> >>>> 3. A single system of record for all IT processes
>> >>>> http://p.sf.net/sfu/servicenow-d2d-j
>> >>>> _______________________________________________
>> >>>> Csound-devel mailing list
>> >>>> Csound-devel@lists.sourceforge.net
>> >>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>>>
>> >>>
>> >>>
>> >>>
>> >>> ------------------------------------------------------------------------------
>> >>> How ServiceNow helps IT people transform IT departments:
>> >>> 1. A cloud service to automate IT design, transition and operations
>> >>> 2. Dashboards that offer high-level views of enterprise services
>> >>> 3. A single system of record for all IT processes
>> >>> http://p.sf.net/sfu/servicenow-d2d-j
>> >>> _______________________________________________
>> >>> Csound-devel mailing list
>> >>> Csound-devel@lists.sourceforge.net
>> >>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>> >>
>> >>
>> >>
>> >> ------------------------------------------------------------------------------
>> >> How ServiceNow helps IT people transform IT departments:
>> >> 1. A cloud service to automate IT design, transition and operations
>> >> 2. Dashboards that offer high-level views of enterprise services
>> >> 3. A single system of record for all IT processes
>> >> http://p.sf.net/sfu/servicenow-d2d-j
>> >> _______________________________________________
>> >> Csound-devel mailing list
>> >> Csound-devel@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > How ServiceNow helps IT people transform IT departments:
>> > 1. A cloud service to automate IT design, transition and operations
>> > 2. Dashboards that offer high-level views of enterprise services
>> > 3. A single system of record for all IT processes
>> > http://p.sf.net/sfu/servicenow-d2d-j
>> > _______________________________________________
>> > Csound-devel mailing list
>> > Csound-devel@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>> Dr Victor Lazzarini
>> Senior Lecturer
>> Dept. of Music
>> NUI Maynooth Ireland
>> tel.: +353 1 708 3545
>> Victor dot Lazzarini AT nuim dot ie
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> How ServiceNow helps IT people transform IT departments:
>> 1. A cloud service to automate IT design, transition and operations
>> 2. Dashboards that offer high-level views of enterprise services
>> 3. A single system of record for all IT processes
>> http://p.sf.net/sfu/servicenow-d2d-j
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
> ------------------------------------------------------------------------------
> How ServiceNow helps IT people transform IT departments:
> 1. A cloud service to automate IT design, transition and operations
> 2. Dashboards that offer high-level views of enterprise services
> 3. A single system of record for all IT processes
> http://p.sf.net/sfu/servicenow-d2d-j
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Date2013-06-07 07:32
FromVictor Lazzarini
SubjectRe: [Cs-dev] Android Csound 6 - loading plugins
AttachmentsNone  None  
Try it now with code from GIT. I made some changes that should prevent any resetting to happen when Csound is created.

Victor
On 7 Jun 2013, at 04:19, Michael Gogins wrote:

I changed the location,  but in my tests it is consistent,  and I verify it by printing out the directory listing from the device in the debugger.

I note that if I call set global env then start Csound Then get env, it returns null. That can't be right. ..

On Jun 6, 2013 10:54 PM, "Steven Yi" <stevenyi@gmail.com> wrote:
Hi Michael,

I took a quick look and had some questions:

1. This seems to be setting the libs to a folder different than what
you're looking for with the list() calls:

String OPCODE6DIR = packageInfo.applicationInfo.dataDir + "/assets/libs";

Shouldn't that be "/assets/armeabi-v7a/OPCODE6DIR" ?


2. For your generated APK file, could you to a "tar tzvf
CSDPlayer.apk" to list the contents and post it here?

Thanks!
steven

p.s. - I'm going on a long drive tomorrow and again on Sunday, so I'll
be off and on the internet the next few days.

On Thu, Jun 6, 2013 at 8:14 PM, Michael Gogins <michael.gogins@gmail.com> wrote:
> I think there may be a difference in that Csound 5 has PreCompile and Csound
> 6 does not... Csound is acting like it forgets the global env I have set.
> I've booked in my code for you all to play with.
>
> Regards,
> Mike
>
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Thu, Jun 6, 2013 at 10:03 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie>
> wrote:
>>
>> Plugins do not normally depend on libsndfile (I changed this ages ago). I
>> think it is more likely that the
>> plugin library was not found. One thing to try is to use --opcode-lib= to
>> load it from the CSDPlayer,
>> placing the plugin in the same dir as the CSD (for convenience).
>>
>> On 6 Jun 2013, at 14:53, Steven Yi wrote:
>>
>> > Just FYI, the way libcsoundandroid.so builds (or did, haven't gotten
>> > to building since the build file changes), it linked in libsndfile
>> > statically so that that libcsoundandroid has both libcsound and
>> > libsndfile into one lib.  I think that was done at the time to just
>> > make it easier to have one lib to distribute, but it'd be fine to
>> > change that to split to libs.
>> >
>> > Can't think of anything else that might be a hint.  I'll wait until
>> > the code is checked in and will look at building/testing here.
>> > Hopefully it's something simple. :)
>> >
>> > On Thu, Jun 6, 2013 at 9:43 AM, Michael Gogins
>> > <michael.gogins@gmail.com> wrote:
>> >> Yes, I was trying with fluidsynth.
>> >>
>> >> Michael Gogins
>> >> Irreducible Productions
>> >> http://michaelgogins.tumblr.com
>> >> Michael dot Gogins at gmail dot com
>> >>
>> >>
>> >> On Thu, Jun 6, 2013 at 9:38 AM, Steven Yi <stevenyi@gmail.com> wrote:
>> >>>
>> >>> Well we eliminate some variables.  I know that the fluidsynth opcode
>> >>> libs built and loaded, as did the stdutil library.  I had tested and
>> >>> got these both to load and run.  If you test with just those
>> >>> libraries, that will eliminate some variables and just leave it to
>> >>> getting the correct path.
>> >>>
>> >>> On Thu, Jun 6, 2013 at 9:32 AM, Michael Gogins
>> >>> <michael.gogins@gmail.com>
>> >>> wrote:
>> >>>> There may be local shared libs I need:
>> >>>>
>> >>>>
>> >>>>
>> >>>> http://stackoverflow.com/questions/11444039/why-am-i-not-able-to-use-my-function-that-is-declared-in-so-library
>> >>>>
>> >>>> Regards,
>> >>>> Mike
>> >>>>
>> >>>> Michael Gogins
>> >>>> Irreducible Productions
>> >>>> http://michaelgogins.tumblr.com
>> >>>> Michael dot Gogins at gmail dot com
>> >>>>
>> >>>>
>> >>>> On Thu, Jun 6, 2013 at 9:18 AM, Michael Gogins
>> >>>> <michael.gogins@gmail.com>
>> >>>> wrote:
>> >>>>>
>> >>>>> I put the dynamically loaded shared libraries in
>> >>>>> assets/armeabi/OPCODE6DIR
>> >>>>> and in assets/armeabi-v7a/OPCODE6DIR.
>> >>>>>
>> >>>>> I put in code to verify that the files actually are in these
>> >>>>> locations
>> >>>>> (they are).
>> >>>>>
>> >>>>> I put in to code to call SetGlobalEnv("OPCODE6DIR",
>> >>>>> "/data/data/assets/aremabi-v7a") just before I call
>> >>>>> CsoundObj.startCsound().
>> >>>>>
>> >>>>> I put in code to verify that the pathname is correct (it is).
>> >>>>>
>> >>>>> No dice... any ideas?
>> >>>>>
>> >>>>> Is it that the global env gets wiped out by the
>> >>>>> CsoundAndroid.Compile()
>> >>>>> call?
>> >>>>>
>> >>>>> Is it something to do with Android permissions?
>> >>>>>
>> >>>>> Is it something to do with dependent libraries like stlport or
>> >>>>> something?
>> >>>>>
>> >>>>> How does one debug C code running on the device?
>> >>>>>
>> >>>>> Regards,
>> >>>>> Mike
>> >>>>>
>> >>>>> Michael Gogins
>> >>>>> Irreducible Productions
>> >>>>> http://michaelgogins.tumblr.com
>> >>>>> Michael dot Gogins at gmail dot com
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>> ------------------------------------------------------------------------------
>> >>>> How ServiceNow helps IT people transform IT departments:
>> >>>> 1. A cloud service to automate IT design, transition and operations
>> >>>> 2. Dashboards that offer high-level views of enterprise services
>> >>>> 3. A single system of record for all IT processes
>> >>>> http://p.sf.net/sfu/servicenow-d2d-j
>> >>>> _______________________________________________
>> >>>> Csound-devel mailing list
>> >>>> Csound-devel@lists.sourceforge.net
>> >>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>>>
>> >>>
>> >>>
>> >>>
>> >>> ------------------------------------------------------------------------------
>> >>> How ServiceNow helps IT people transform IT departments:
>> >>> 1. A cloud service to automate IT design, transition and operations
>> >>> 2. Dashboards that offer high-level views of enterprise services
>> >>> 3. A single system of record for all IT processes
>> >>> http://p.sf.net/sfu/servicenow-d2d-j
>> >>> _______________________________________________
>> >>> Csound-devel mailing list
>> >>> Csound-devel@lists.sourceforge.net
>> >>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>> >>
>> >>
>> >>
>> >> ------------------------------------------------------------------------------
>> >> How ServiceNow helps IT people transform IT departments:
>> >> 1. A cloud service to automate IT design, transition and operations
>> >> 2. Dashboards that offer high-level views of enterprise services
>> >> 3. A single system of record for all IT processes
>> >> http://p.sf.net/sfu/servicenow-d2d-j
>> >> _______________________________________________
>> >> Csound-devel mailing list
>> >> Csound-devel@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > How ServiceNow helps IT people transform IT departments:
>> > 1. A cloud service to automate IT design, transition and operations
>> > 2. Dashboards that offer high-level views of enterprise services
>> > 3. A single system of record for all IT processes
>> > http://p.sf.net/sfu/servicenow-d2d-j
>> > _______________________________________________
>> > Csound-devel mailing list
>> > Csound-devel@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>> Dr Victor Lazzarini
>> Senior Lecturer
>> Dept. of Music
>> NUI Maynooth Ireland
>> tel.: +353 1 708 3545
>> Victor dot Lazzarini AT nuim dot ie
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> How ServiceNow helps IT people transform IT departments:
>> 1. A cloud service to automate IT design, transition and operations
>> 2. Dashboards that offer high-level views of enterprise services
>> 3. A single system of record for all IT processes
>> http://p.sf.net/sfu/servicenow-d2d-j
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
> ------------------------------------------------------------------------------
> How ServiceNow helps IT people transform IT departments:
> 1. A cloud service to automate IT design, transition and operations
> 2. Dashboards that offer high-level views of enterprise services
> 3. A single system of record for all IT processes
> http://p.sf.net/sfu/servicenow-d2d-j
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




Date2013-06-07 12:41
FromMichael Gogins
SubjectRe: [Cs-dev] Android Csound 6 - loading plugins
AttachmentsNone  None  
Thanks for the quick change.

Unfortunately, it's still not working. The value of OPCODE6DIR is now returned as I expect from getEnv after starting Csound, but still no load.

Is this "float" or "double" Csound here? Should it be OPCODE6DIR64 instead of just OPCODE6DIR?

Anyway, the code is cleaned up a bit, made consistent, and checked in, so you should be download and debug. In the debugger you can inspect what getAssets returns and see that the files are indeed where OPCODE6DIR says they should be.

BTW, I renamed CsoundApp.apk to Csound6.apk.

Regards,
Mike





Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Jun 7, 2013 at 2:32 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Try it now with code from GIT. I made some changes that should prevent any resetting to happen when Csound is created.

Victor

On 7 Jun 2013, at 04:19, Michael Gogins wrote:

I changed the location,  but in my tests it is consistent,  and I verify it by printing out the directory listing from the device in the debugger.

I note that if I call set global env then start Csound Then get env, it returns null. That can't be right. ..

On Jun 6, 2013 10:54 PM, "Steven Yi" <stevenyi@gmail.com> wrote:
Hi Michael,

I took a quick look and had some questions:

1. This seems to be setting the libs to a folder different than what
you're looking for with the list() calls:

String OPCODE6DIR = packageInfo.applicationInfo.dataDir + "/assets/libs";

Shouldn't that be "/assets/armeabi-v7a/OPCODE6DIR" ?


2. For your generated APK file, could you to a "tar tzvf
CSDPlayer.apk" to list the contents and post it here?

Thanks!
steven

p.s. - I'm going on a long drive tomorrow and again on Sunday, so I'll
be off and on the internet the next few days.

On Thu, Jun 6, 2013 at 8:14 PM, Michael Gogins <michael.gogins@gmail.com> wrote:
> I think there may be a difference in that Csound 5 has PreCompile and Csound
> 6 does not... Csound is acting like it forgets the global env I have set.
> I've booked in my code for you all to play with.
>
> Regards,
> Mike
>
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Thu, Jun 6, 2013 at 10:03 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie>
> wrote:
>>
>> Plugins do not normally depend on libsndfile (I changed this ages ago). I
>> think it is more likely that the
>> plugin library was not found. One thing to try is to use --opcode-lib= to
>> load it from the CSDPlayer,
>> placing the plugin in the same dir as the CSD (for convenience).
>>
>> On 6 Jun 2013, at 14:53, Steven Yi wrote:
>>
>> > Just FYI, the way libcsoundandroid.so builds (or did, haven't gotten
>> > to building since the build file changes), it linked in libsndfile
>> > statically so that that libcsoundandroid has both libcsound and
>> > libsndfile into one lib.  I think that was done at the time to just
>> > make it easier to have one lib to distribute, but it'd be fine to
>> > change that to split to libs.
>> >
>> > Can't think of anything else that might be a hint.  I'll wait until
>> > the code is checked in and will look at building/testing here.
>> > Hopefully it's something simple. :)
>> >
>> > On Thu, Jun 6, 2013 at 9:43 AM, Michael Gogins
>> > <michael.gogins@gmail.com> wrote:
>> >> Yes, I was trying with fluidsynth.
>> >>
>> >> Michael Gogins
>> >> Irreducible Productions
>> >> http://michaelgogins.tumblr.com
>> >> Michael dot Gogins at gmail dot com
>> >>
>> >>
>> >> On Thu, Jun 6, 2013 at 9:38 AM, Steven Yi <stevenyi@gmail.com> wrote:
>> >>>
>> >>> Well we eliminate some variables.  I know that the fluidsynth opcode
>> >>> libs built and loaded, as did the stdutil library.  I had tested and
>> >>> got these both to load and run.  If you test with just those
>> >>> libraries, that will eliminate some variables and just leave it to
>> >>> getting the correct path.
>> >>>
>> >>> On Thu, Jun 6, 2013 at 9:32 AM, Michael Gogins
>> >>> <michael.gogins@gmail.com>
>> >>> wrote:
>> >>>> There may be local shared libs I need:
>> >>>>
>> >>>>
>> >>>>
>> >>>> http://stackoverflow.com/questions/11444039/why-am-i-not-able-to-use-my-function-that-is-declared-in-so-library
>> >>>>
>> >>>> Regards,
>> >>>> Mike
>> >>>>
>> >>>> Michael Gogins
>> >>>> Irreducible Productions
>> >>>> http://michaelgogins.tumblr.com
>> >>>> Michael dot Gogins at gmail dot com
>> >>>>
>> >>>>
>> >>>> On Thu, Jun 6, 2013 at 9:18 AM, Michael Gogins
>> >>>> <michael.gogins@gmail.com>
>> >>>> wrote:
>> >>>>>
>> >>>>> I put the dynamically loaded shared libraries in
>> >>>>> assets/armeabi/OPCODE6DIR
>> >>>>> and in assets/armeabi-v7a/OPCODE6DIR.
>> >>>>>
>> >>>>> I put in code to verify that the files actually are in these
>> >>>>> locations
>> >>>>> (they are).
>> >>>>>
>> >>>>> I put in to code to call SetGlobalEnv("OPCODE6DIR",
>> >>>>> "/data/data/assets/aremabi-v7a") just before I call
>> >>>>> CsoundObj.startCsound().
>> >>>>>
>> >>>>> I put in code to verify that the pathname is correct (it is).
>> >>>>>
>> >>>>> No dice... any ideas?
>> >>>>>
>> >>>>> Is it that the global env gets wiped out by the
>> >>>>> CsoundAndroid.Compile()
>> >>>>> call?
>> >>>>>
>> >>>>> Is it something to do with Android permissions?
>> >>>>>
>> >>>>> Is it something to do with dependent libraries like stlport or
>> >>>>> something?
>> >>>>>
>> >>>>> How does one debug C code running on the device?
>> >>>>>
>> >>>>> Regards,
>> >>>>> Mike
>> >>>>>
>> >>>>> Michael Gogins
>> >>>>> Irreducible Productions
>> >>>>> http://michaelgogins.tumblr.com
>> >>>>> Michael dot Gogins at gmail dot com
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>> ------------------------------------------------------------------------------
>> >>>> How ServiceNow helps IT people transform IT departments:
>> >>>> 1. A cloud service to automate IT design, transition and operations
>> >>>> 2. Dashboards that offer high-level views of enterprise services
>> >>>> 3. A single system of record for all IT processes
>> >>>> http://p.sf.net/sfu/servicenow-d2d-j
>> >>>> _______________________________________________
>> >>>> Csound-devel mailing list
>> >>>> Csound-devel@lists.sourceforge.net
>> >>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>>>
>> >>>
>> >>>
>> >>>
>> >>> ------------------------------------------------------------------------------
>> >>> How ServiceNow helps IT people transform IT departments:
>> >>> 1. A cloud service to automate IT design, transition and operations
>> >>> 2. Dashboards that offer high-level views of enterprise services
>> >>> 3. A single system of record for all IT processes
>> >>> http://p.sf.net/sfu/servicenow-d2d-j
>> >>> _______________________________________________
>> >>> Csound-devel mailing list
>> >>> Csound-devel@lists.sourceforge.net
>> >>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>> >>
>> >>
>> >>
>> >> ------------------------------------------------------------------------------
>> >> How ServiceNow helps IT people transform IT departments:
>> >> 1. A cloud service to automate IT design, transition and operations
>> >> 2. Dashboards that offer high-level views of enterprise services
>> >> 3. A single system of record for all IT processes
>> >> http://p.sf.net/sfu/servicenow-d2d-j
>> >> _______________________________________________
>> >> Csound-devel mailing list
>> >> Csound-devel@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > How ServiceNow helps IT people transform IT departments:
>> > 1. A cloud service to automate IT design, transition and operations
>> > 2. Dashboards that offer high-level views of enterprise services
>> > 3. A single system of record for all IT processes
>> > http://p.sf.net/sfu/servicenow-d2d-j
>> > _______________________________________________
>> > Csound-devel mailing list
>> > Csound-devel@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>> Dr Victor Lazzarini
>> Senior Lecturer
>> Dept. of Music
>> NUI Maynooth Ireland
>> tel.: +353 1 708 3545
>> Victor dot Lazzarini AT nuim dot ie
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> How ServiceNow helps IT people transform IT departments:
>> 1. A cloud service to automate IT design, transition and operations
>> 2. Dashboards that offer high-level views of enterprise services
>> 3. A single system of record for all IT processes
>> http://p.sf.net/sfu/servicenow-d2d-j
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
> ------------------------------------------------------------------------------
> How ServiceNow helps IT people transform IT departments:
> 1. A cloud service to automate IT design, transition and operations
> 2. Dashboards that offer high-level views of enterprise services
> 3. A single system of record for all IT processes
> http://p.sf.net/sfu/servicenow-d2d-j
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



Date2013-06-07 14:31
FromVictor Lazzarini
SubjectRe: [Cs-dev] Android Csound 6 - loading plugins
AttachmentsNone  None  
It's floats, so it should be OPCODE6DIR, but you could set both.

I'll look again at the Csound set env code to see if I can spot anything. Could you outline here the sequence of API calls?

On 7 Jun 2013, at 12:41, Michael Gogins wrote:

Thanks for the quick change.

Unfortunately, it's still not working. The value of OPCODE6DIR is now returned as I expect from getEnv after starting Csound, but still no load.

Is this "float" or "double" Csound here? Should it be OPCODE6DIR64 instead of just OPCODE6DIR?

Anyway, the code is cleaned up a bit, made consistent, and checked in, so you should be download and debug. In the debugger you can inspect what getAssets returns and see that the files are indeed where OPCODE6DIR says they should be.

BTW, I renamed CsoundApp.apk to Csound6.apk.

Regards,
Mike





Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Jun 7, 2013 at 2:32 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Try it now with code from GIT. I made some changes that should prevent any resetting to happen when Csound is created.

Victor

On 7 Jun 2013, at 04:19, Michael Gogins wrote:

I changed the location,  but in my tests it is consistent,  and I verify it by printing out the directory listing from the device in the debugger.

I note that if I call set global env then start Csound Then get env, it returns null. That can't be right. ..

On Jun 6, 2013 10:54 PM, "Steven Yi" <stevenyi@gmail.com> wrote:
Hi Michael,

I took a quick look and had some questions:

1. This seems to be setting the libs to a folder different than what
you're looking for with the list() calls:

String OPCODE6DIR = packageInfo.applicationInfo.dataDir + "/assets/libs";

Shouldn't that be "/assets/armeabi-v7a/OPCODE6DIR" ?


2. For your generated APK file, could you to a "tar tzvf
CSDPlayer.apk" to list the contents and post it here?

Thanks!
steven

p.s. - I'm going on a long drive tomorrow and again on Sunday, so I'll
be off and on the internet the next few days.

On Thu, Jun 6, 2013 at 8:14 PM, Michael Gogins <michael.gogins@gmail.com> wrote:
> I think there may be a difference in that Csound 5 has PreCompile and Csound
> 6 does not... Csound is acting like it forgets the global env I have set.
> I've booked in my code for you all to play with.
>
> Regards,
> Mike
>
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Thu, Jun 6, 2013 at 10:03 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie>
> wrote:
>>
>> Plugins do not normally depend on libsndfile (I changed this ages ago). I
>> think it is more likely that the
>> plugin library was not found. One thing to try is to use --opcode-lib= to
>> load it from the CSDPlayer,
>> placing the plugin in the same dir as the CSD (for convenience).
>>
>> On 6 Jun 2013, at 14:53, Steven Yi wrote:
>>
>> > Just FYI, the way libcsoundandroid.so builds (or did, haven't gotten
>> > to building since the build file changes), it linked in libsndfile
>> > statically so that that libcsoundandroid has both libcsound and
>> > libsndfile into one lib.  I think that was done at the time to just
>> > make it easier to have one lib to distribute, but it'd be fine to
>> > change that to split to libs.
>> >
>> > Can't think of anything else that might be a hint.  I'll wait until
>> > the code is checked in and will look at building/testing here.
>> > Hopefully it's something simple. :)
>> >
>> > On Thu, Jun 6, 2013 at 9:43 AM, Michael Gogins
>> > <michael.gogins@gmail.com> wrote:
>> >> Yes, I was trying with fluidsynth.
>> >>
>> >> Michael Gogins
>> >> Irreducible Productions
>> >> http://michaelgogins.tumblr.com
>> >> Michael dot Gogins at gmail dot com
>> >>
>> >>
>> >> On Thu, Jun 6, 2013 at 9:38 AM, Steven Yi <stevenyi@gmail.com> wrote:
>> >>>
>> >>> Well we eliminate some variables.  I know that the fluidsynth opcode
>> >>> libs built and loaded, as did the stdutil library.  I had tested and
>> >>> got these both to load and run.  If you test with just those
>> >>> libraries, that will eliminate some variables and just leave it to
>> >>> getting the correct path.
>> >>>
>> >>> On Thu, Jun 6, 2013 at 9:32 AM, Michael Gogins
>> >>> <michael.gogins@gmail.com>
>> >>> wrote:
>> >>>> There may be local shared libs I need:
>> >>>>
>> >>>>
>> >>>>
>> >>>> http://stackoverflow.com/questions/11444039/why-am-i-not-able-to-use-my-function-that-is-declared-in-so-library
>> >>>>
>> >>>> Regards,
>> >>>> Mike
>> >>>>
>> >>>> Michael Gogins
>> >>>> Irreducible Productions
>> >>>> http://michaelgogins.tumblr.com
>> >>>> Michael dot Gogins at gmail dot com
>> >>>>
>> >>>>
>> >>>> On Thu, Jun 6, 2013 at 9:18 AM, Michael Gogins
>> >>>> <michael.gogins@gmail.com>
>> >>>> wrote:
>> >>>>>
>> >>>>> I put the dynamically loaded shared libraries in
>> >>>>> assets/armeabi/OPCODE6DIR
>> >>>>> and in assets/armeabi-v7a/OPCODE6DIR.
>> >>>>>
>> >>>>> I put in code to verify that the files actually are in these
>> >>>>> locations
>> >>>>> (they are).
>> >>>>>
>> >>>>> I put in to code to call SetGlobalEnv("OPCODE6DIR",
>> >>>>> "/data/data/assets/aremabi-v7a") just before I call
>> >>>>> CsoundObj.startCsound().
>> >>>>>
>> >>>>> I put in code to verify that the pathname is correct (it is).
>> >>>>>
>> >>>>> No dice... any ideas?
>> >>>>>
>> >>>>> Is it that the global env gets wiped out by the
>> >>>>> CsoundAndroid.Compile()
>> >>>>> call?
>> >>>>>
>> >>>>> Is it something to do with Android permissions?
>> >>>>>
>> >>>>> Is it something to do with dependent libraries like stlport or
>> >>>>> something?
>> >>>>>
>> >>>>> How does one debug C code running on the device?
>> >>>>>
>> >>>>> Regards,
>> >>>>> Mike
>> >>>>>
>> >>>>> Michael Gogins
>> >>>>> Irreducible Productions
>> >>>>> http://michaelgogins.tumblr.com
>> >>>>> Michael dot Gogins at gmail dot com
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>> ------------------------------------------------------------------------------
>> >>>> How ServiceNow helps IT people transform IT departments:
>> >>>> 1. A cloud service to automate IT design, transition and operations
>> >>>> 2. Dashboards that offer high-level views of enterprise services
>> >>>> 3. A single system of record for all IT processes
>> >>>> http://p.sf.net/sfu/servicenow-d2d-j
>> >>>> _______________________________________________
>> >>>> Csound-devel mailing list
>> >>>> Csound-devel@lists.sourceforge.net
>> >>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>>>
>> >>>
>> >>>
>> >>>
>> >>> ------------------------------------------------------------------------------
>> >>> How ServiceNow helps IT people transform IT departments:
>> >>> 1. A cloud service to automate IT design, transition and operations
>> >>> 2. Dashboards that offer high-level views of enterprise services
>> >>> 3. A single system of record for all IT processes
>> >>> http://p.sf.net/sfu/servicenow-d2d-j
>> >>> _______________________________________________
>> >>> Csound-devel mailing list
>> >>> Csound-devel@lists.sourceforge.net
>> >>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>> >>
>> >>
>> >>
>> >> ------------------------------------------------------------------------------
>> >> How ServiceNow helps IT people transform IT departments:
>> >> 1. A cloud service to automate IT design, transition and operations
>> >> 2. Dashboards that offer high-level views of enterprise services
>> >> 3. A single system of record for all IT processes
>> >> http://p.sf.net/sfu/servicenow-d2d-j
>> >> _______________________________________________
>> >> Csound-devel mailing list
>> >> Csound-devel@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > How ServiceNow helps IT people transform IT departments:
>> > 1. A cloud service to automate IT design, transition and operations
>> > 2. Dashboards that offer high-level views of enterprise services
>> > 3. A single system of record for all IT processes
>> > http://p.sf.net/sfu/servicenow-d2d-j
>> > _______________________________________________
>> > Csound-devel mailing list
>> > Csound-devel@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>> Dr Victor Lazzarini
>> Senior Lecturer
>> Dept. of Music
>> NUI Maynooth Ireland
>> tel.: +353 1 708 3545
>> Victor dot Lazzarini AT nuim dot ie
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> How ServiceNow helps IT people transform IT departments:
>> 1. A cloud service to automate IT design, transition and operations
>> 2. Dashboards that offer high-level views of enterprise services
>> 3. A single system of record for all IT processes
>> http://p.sf.net/sfu/servicenow-d2d-j
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
> ------------------------------------------------------------------------------
> How ServiceNow helps IT people transform IT departments:
> 1. A cloud service to automate IT design, transition and operations
> 2. Dashboards that offer high-level views of enterprise services
> 3. A single system of record for all IT processes
> http://p.sf.net/sfu/servicenow-d2d-j
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




Date2013-06-07 14:47
FromVictor Lazzarini
SubjectRe: [Cs-dev] Android Csound 6 - loading plugins
AttachmentsNone  None  
Just looking at the code, if you call 

csoundSetGlobalEnv(name, value);

to set a global var,and then call

csoundGetEnv(csound, name);

it will not find it, probably returning NULL, because it is not looking at the global vars list, but
at the instance envrionment vars (look in envvar.c code).

But if you call csoundGetEnv(NULL, name), it will look at the global var list.

alternatively, use csoundSetEnv(), to use instance global vars.

On 7 Jun 2013, at 14:31, Victor Lazzarini wrote:

It's floats, so it should be OPCODE6DIR, but you could set both.

I'll look again at the Csound set env code to see if I can spot anything. Could you outline here the sequence of API calls?

On 7 Jun 2013, at 12:41, Michael Gogins wrote:

Thanks for the quick change.

Unfortunately, it's still not working. The value of OPCODE6DIR is now returned as I expect from getEnv after starting Csound, but still no load.

Is this "float" or "double" Csound here? Should it be OPCODE6DIR64 instead of just OPCODE6DIR?

Anyway, the code is cleaned up a bit, made consistent, and checked in, so you should be download and debug. In the debugger you can inspect what getAssets returns and see that the files are indeed where OPCODE6DIR says they should be.

BTW, I renamed CsoundApp.apk to Csound6.apk.

Regards,
Mike





Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Jun 7, 2013 at 2:32 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Try it now with code from GIT. I made some changes that should prevent any resetting to happen when Csound is created.

Victor

On 7 Jun 2013, at 04:19, Michael Gogins wrote:

I changed the location,  but in my tests it is consistent,  and I verify it by printing out the directory listing from the device in the debugger.

I note that if I call set global env then start Csound Then get env, it returns null. That can't be right. ..

On Jun 6, 2013 10:54 PM, "Steven Yi" <stevenyi@gmail.com> wrote:
Hi Michael,

I took a quick look and had some questions:

1. This seems to be setting the libs to a folder different than what
you're looking for with the list() calls:

String OPCODE6DIR = packageInfo.applicationInfo.dataDir + "/assets/libs";

Shouldn't that be "/assets/armeabi-v7a/OPCODE6DIR" ?


2. For your generated APK file, could you to a "tar tzvf
CSDPlayer.apk" to list the contents and post it here?

Thanks!
steven

p.s. - I'm going on a long drive tomorrow and again on Sunday, so I'll
be off and on the internet the next few days.

On Thu, Jun 6, 2013 at 8:14 PM, Michael Gogins <michael.gogins@gmail.com> wrote:
> I think there may be a difference in that Csound 5 has PreCompile and Csound
> 6 does not... Csound is acting like it forgets the global env I have set.
> I've booked in my code for you all to play with.
>
> Regards,
> Mike
>
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Thu, Jun 6, 2013 at 10:03 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie>
> wrote:
>>
>> Plugins do not normally depend on libsndfile (I changed this ages ago). I
>> think it is more likely that the
>> plugin library was not found. One thing to try is to use --opcode-lib= to
>> load it from the CSDPlayer,
>> placing the plugin in the same dir as the CSD (for convenience).
>>
>> On 6 Jun 2013, at 14:53, Steven Yi wrote:
>>
>> > Just FYI, the way libcsoundandroid.so builds (or did, haven't gotten
>> > to building since the build file changes), it linked in libsndfile
>> > statically so that that libcsoundandroid has both libcsound and
>> > libsndfile into one lib.  I think that was done at the time to just
>> > make it easier to have one lib to distribute, but it'd be fine to
>> > change that to split to libs.
>> >
>> > Can't think of anything else that might be a hint.  I'll wait until
>> > the code is checked in and will look at building/testing here.
>> > Hopefully it's something simple. :)
>> >
>> > On Thu, Jun 6, 2013 at 9:43 AM, Michael Gogins
>> > <michael.gogins@gmail.com> wrote:
>> >> Yes, I was trying with fluidsynth.
>> >>
>> >> Michael Gogins
>> >> Irreducible Productions
>> >> http://michaelgogins.tumblr.com
>> >> Michael dot Gogins at gmail dot com
>> >>
>> >>
>> >> On Thu, Jun 6, 2013 at 9:38 AM, Steven Yi <stevenyi@gmail.com> wrote:
>> >>>
>> >>> Well we eliminate some variables.  I know that the fluidsynth opcode
>> >>> libs built and loaded, as did the stdutil library.  I had tested and
>> >>> got these both to load and run.  If you test with just those
>> >>> libraries, that will eliminate some variables and just leave it to
>> >>> getting the correct path.
>> >>>
>> >>> On Thu, Jun 6, 2013 at 9:32 AM, Michael Gogins
>> >>> <michael.gogins@gmail.com>
>> >>> wrote:
>> >>>> There may be local shared libs I need:
>> >>>>
>> >>>>
>> >>>>
>> >>>> http://stackoverflow.com/questions/11444039/why-am-i-not-able-to-use-my-function-that-is-declared-in-so-library
>> >>>>
>> >>>> Regards,
>> >>>> Mike
>> >>>>
>> >>>> Michael Gogins
>> >>>> Irreducible Productions
>> >>>> http://michaelgogins.tumblr.com
>> >>>> Michael dot Gogins at gmail dot com
>> >>>>
>> >>>>
>> >>>> On Thu, Jun 6, 2013 at 9:18 AM, Michael Gogins
>> >>>> <michael.gogins@gmail.com>
>> >>>> wrote:
>> >>>>>
>> >>>>> I put the dynamically loaded shared libraries in
>> >>>>> assets/armeabi/OPCODE6DIR
>> >>>>> and in assets/armeabi-v7a/OPCODE6DIR.
>> >>>>>
>> >>>>> I put in code to verify that the files actually are in these
>> >>>>> locations
>> >>>>> (they are).
>> >>>>>
>> >>>>> I put in to code to call SetGlobalEnv("OPCODE6DIR",
>> >>>>> "/data/data/assets/aremabi-v7a") just before I call
>> >>>>> CsoundObj.startCsound().
>> >>>>>
>> >>>>> I put in code to verify that the pathname is correct (it is).
>> >>>>>
>> >>>>> No dice... any ideas?
>> >>>>>
>> >>>>> Is it that the global env gets wiped out by the
>> >>>>> CsoundAndroid.Compile()
>> >>>>> call?
>> >>>>>
>> >>>>> Is it something to do with Android permissions?
>> >>>>>
>> >>>>> Is it something to do with dependent libraries like stlport or
>> >>>>> something?
>> >>>>>
>> >>>>> How does one debug C code running on the device?
>> >>>>>
>> >>>>> Regards,
>> >>>>> Mike
>> >>>>>
>> >>>>> Michael Gogins
>> >>>>> Irreducible Productions
>> >>>>> http://michaelgogins.tumblr.com
>> >>>>> Michael dot Gogins at gmail dot com
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>> ------------------------------------------------------------------------------
>> >>>> How ServiceNow helps IT people transform IT departments:
>> >>>> 1. A cloud service to automate IT design, transition and operations
>> >>>> 2. Dashboards that offer high-level views of enterprise services
>> >>>> 3. A single system of record for all IT processes
>> >>>> http://p.sf.net/sfu/servicenow-d2d-j
>> >>>> _______________________________________________
>> >>>> Csound-devel mailing list
>> >>>> Csound-devel@lists.sourceforge.net
>> >>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>>>
>> >>>
>> >>>
>> >>>
>> >>> ------------------------------------------------------------------------------
>> >>> How ServiceNow helps IT people transform IT departments:
>> >>> 1. A cloud service to automate IT design, transition and operations
>> >>> 2. Dashboards that offer high-level views of enterprise services
>> >>> 3. A single system of record for all IT processes
>> >>> http://p.sf.net/sfu/servicenow-d2d-j
>> >>> _______________________________________________
>> >>> Csound-devel mailing list
>> >>> Csound-devel@lists.sourceforge.net
>> >>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>> >>
>> >>
>> >>
>> >> ------------------------------------------------------------------------------
>> >> How ServiceNow helps IT people transform IT departments:
>> >> 1. A cloud service to automate IT design, transition and operations
>> >> 2. Dashboards that offer high-level views of enterprise services
>> >> 3. A single system of record for all IT processes
>> >> http://p.sf.net/sfu/servicenow-d2d-j
>> >> _______________________________________________
>> >> Csound-devel mailing list
>> >> Csound-devel@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > How ServiceNow helps IT people transform IT departments:
>> > 1. A cloud service to automate IT design, transition and operations
>> > 2. Dashboards that offer high-level views of enterprise services
>> > 3. A single system of record for all IT processes
>> > http://p.sf.net/sfu/servicenow-d2d-j
>> > _______________________________________________
>> > Csound-devel mailing list
>> > Csound-devel@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>> Dr Victor Lazzarini
>> Senior Lecturer
>> Dept. of Music
>> NUI Maynooth Ireland
>> tel.: +353 1 708 3545
>> Victor dot Lazzarini AT nuim dot ie
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> How ServiceNow helps IT people transform IT departments:
>> 1. A cloud service to automate IT design, transition and operations
>> 2. Dashboards that offer high-level views of enterprise services
>> 3. A single system of record for all IT processes
>> http://p.sf.net/sfu/servicenow-d2d-j
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
> ------------------------------------------------------------------------------
> How ServiceNow helps IT people transform IT departments:
> 1. A cloud service to automate IT design, transition and operations
> 2. Dashboards that offer high-level views of enterprise services
> 3. A single system of record for all IT processes
> http://p.sf.net/sfu/servicenow-d2d-j
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie



------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




Date2013-06-07 14:55
FromMichael Gogins
SubjectRe: [Cs-dev] Android Csound 6 - loading plugins
AttachmentsNone  None  
Oh dear, looks like by renaming things I removed the CsoundAppActivity.java code from Git, I won't be able to put it back till this evening...

Here's the code from the earlier revision:
startStopButton = (ToggleButton) findViewById(R.id.runButton);
startStopButton.setOnClickListener(new OnClickListener() {
public synchronized void onClick(View v) {
if (csd == null) {
startStopButton.toggle();
return;
}
if (startStopButton.isChecked()) {
csound = new CsoundObj();
csound.messagePoster = CsoundAppActivity.this;
csound.setMessageLoggingEnabled(true);
// Make sure this stuff really got packaged.
// We can interrogate the shared libs dir the same way
// to see what architecture is running.
String samples[] = null;
String armeabi[] = null;
String armeabi_v7a[] = null;
try {
samples = getAssets().list("samples");
armeabi = getAssets().list("armeabi/OPCODE6DIR");
armeabi_v7a = getAssets().list("armeabi-v7a/OPCODE6DIR");
} catch (IOException e) {
e.printStackTrace();
}
// We ask for the data directory in case Android changes on us without warning.
PackageInfo packageInfo = null;
try {
packageInfo = getPackageManager().getPackageInfo(getPackageName(), 0);
} catch (NameNotFoundException e) {
e.printStackTrace();
}
String channelName;
for (int i = 0; i < 5; i++) {
channelName = "slider" + (i + 1);
csound.addSlider(sliders.get(i), channelName, 0., 1.);
channelName = "butt" + (i + 1);
csound.addButton(buttons.get(i), channelName, 1);
}
csound.addButton(pad, "trackpad", 1);
csound.enableAccelerometer(CsoundAppActivity.this);
csound.addCompletionListener(CsoundAppActivity.this);
// Set Csound environment variables.
String OPCODE6DIR = packageInfo.applicationInfo.dataDir + "/assets/libs";
String SSDIR = packageInfo.applicationInfo.dataDir + "/assets/samples";
csound.getCsound().SetGlobalEnv("OPCODE6DIR", OPCODE6DIR);
csound.getCsound().SetGlobalEnv("SSDIR", SSDIR);
csound.startCsound(csd);
postMessageClear("Csound is starting...\n");
csound.getCsound().Message("OPCODE6DIR has been set to: " + csound.getCsound().GetEnv("OPCODE6DIR") + "\n");
csound.getCsound().Message("SSDIR has been set to: " + csound.getCsound().GetEnv("SSDIR") + "\n");
} else {
csound.stopCsound();
postMessage("Csound has been stopped.\n");
}
}
});




Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Jun 7, 2013 at 9:31 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
It's floats, so it should be OPCODE6DIR, but you could set both.

I'll look again at the Csound set env code to see if I can spot anything. Could you outline here the sequence of API calls?

On 7 Jun 2013, at 12:41, Michael Gogins wrote:

Thanks for the quick change.

Unfortunately, it's still not working. The value of OPCODE6DIR is now returned as I expect from getEnv after starting Csound, but still no load.

Is this "float" or "double" Csound here? Should it be OPCODE6DIR64 instead of just OPCODE6DIR?

Anyway, the code is cleaned up a bit, made consistent, and checked in, so you should be download and debug. In the debugger you can inspect what getAssets returns and see that the files are indeed where OPCODE6DIR says they should be.

BTW, I renamed CsoundApp.apk to Csound6.apk.

Regards,
Mike





Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Jun 7, 2013 at 2:32 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Try it now with code from GIT. I made some changes that should prevent any resetting to happen when Csound is created.

Victor

On 7 Jun 2013, at 04:19, Michael Gogins wrote:

I changed the location,  but in my tests it is consistent,  and I verify it by printing out the directory listing from the device in the debugger.

I note that if I call set global env then start Csound Then get env, it returns null. That can't be right. ..

On Jun 6, 2013 10:54 PM, "Steven Yi" <stevenyi@gmail.com> wrote:
Hi Michael,

I took a quick look and had some questions:

1. This seems to be setting the libs to a folder different than what
you're looking for with the list() calls:

String OPCODE6DIR = packageInfo.applicationInfo.dataDir + "/assets/libs";

Shouldn't that be "/assets/armeabi-v7a/OPCODE6DIR" ?


2. For your generated APK file, could you to a "tar tzvf
CSDPlayer.apk" to list the contents and post it here?

Thanks!
steven

p.s. - I'm going on a long drive tomorrow and again on Sunday, so I'll
be off and on the internet the next few days.

On Thu, Jun 6, 2013 at 8:14 PM, Michael Gogins <michael.gogins@gmail.com> wrote:
> I think there may be a difference in that Csound 5 has PreCompile and Csound
> 6 does not... Csound is acting like it forgets the global env I have set.
> I've booked in my code for you all to play with.
>
> Regards,
> Mike
>
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Thu, Jun 6, 2013 at 10:03 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie>
> wrote:
>>
>> Plugins do not normally depend on libsndfile (I changed this ages ago). I
>> think it is more likely that the
>> plugin library was not found. One thing to try is to use --opcode-lib= to
>> load it from the CSDPlayer,
>> placing the plugin in the same dir as the CSD (for convenience).
>>
>> On 6 Jun 2013, at 14:53, Steven Yi wrote:
>>
>> > Just FYI, the way libcsoundandroid.so builds (or did, haven't gotten
>> > to building since the build file changes), it linked in libsndfile
>> > statically so that that libcsoundandroid has both libcsound and
>> > libsndfile into one lib.  I think that was done at the time to just
>> > make it easier to have one lib to distribute, but it'd be fine to
>> > change that to split to libs.
>> >
>> > Can't think of anything else that might be a hint.  I'll wait until
>> > the code is checked in and will look at building/testing here.
>> > Hopefully it's something simple. :)
>> >
>> > On Thu, Jun 6, 2013 at 9:43 AM, Michael Gogins
>> > <michael.gogins@gmail.com> wrote:
>> >> Yes, I was trying with fluidsynth.
>> >>
>> >> Michael Gogins
>> >> Irreducible Productions
>> >> http://michaelgogins.tumblr.com
>> >> Michael dot Gogins at gmail dot com
>> >>
>> >>
>> >> On Thu, Jun 6, 2013 at 9:38 AM, Steven Yi <stevenyi@gmail.com> wrote:
>> >>>
>> >>> Well we eliminate some variables.  I know that the fluidsynth opcode
>> >>> libs built and loaded, as did the stdutil library.  I had tested and
>> >>> got these both to load and run.  If you test with just those
>> >>> libraries, that will eliminate some variables and just leave it to
>> >>> getting the correct path.
>> >>>
>> >>> On Thu, Jun 6, 2013 at 9:32 AM, Michael Gogins
>> >>> <michael.gogins@gmail.com>
>> >>> wrote:
>> >>>> There may be local shared libs I need:
>> >>>>
>> >>>>
>> >>>>
>> >>>> http://stackoverflow.com/questions/11444039/why-am-i-not-able-to-use-my-function-that-is-declared-in-so-library
>> >>>>
>> >>>> Regards,
>> >>>> Mike
>> >>>>
>> >>>> Michael Gogins
>> >>>> Irreducible Productions
>> >>>> http://michaelgogins.tumblr.com
>> >>>> Michael dot Gogins at gmail dot com
>> >>>>
>> >>>>
>> >>>> On Thu, Jun 6, 2013 at 9:18 AM, Michael Gogins
>> >>>> <michael.gogins@gmail.com>
>> >>>> wrote:
>> >>>>>
>> >>>>> I put the dynamically loaded shared libraries in
>> >>>>> assets/armeabi/OPCODE6DIR
>> >>>>> and in assets/armeabi-v7a/OPCODE6DIR.
>> >>>>>
>> >>>>> I put in code to verify that the files actually are in these
>> >>>>> locations
>> >>>>> (they are).
>> >>>>>
>> >>>>> I put in to code to call SetGlobalEnv("OPCODE6DIR",
>> >>>>> "/data/data/assets/aremabi-v7a") just before I call
>> >>>>> CsoundObj.startCsound().
>> >>>>>
>> >>>>> I put in code to verify that the pathname is correct (it is).
>> >>>>>
>> >>>>> No dice... any ideas?
>> >>>>>
>> >>>>> Is it that the global env gets wiped out by the
>> >>>>> CsoundAndroid.Compile()
>> >>>>> call?
>> >>>>>
>> >>>>> Is it something to do with Android permissions?
>> >>>>>
>> >>>>> Is it something to do with dependent libraries like stlport or
>> >>>>> something?
>> >>>>>
>> >>>>> How does one debug C code running on the device?
>> >>>>>
>> >>>>> Regards,
>> >>>>> Mike
>> >>>>>
>> >>>>> Michael Gogins
>> >>>>> Irreducible Productions
>> >>>>> http://michaelgogins.tumblr.com
>> >>>>> Michael dot Gogins at gmail dot com
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>> ------------------------------------------------------------------------------
>> >>>> How ServiceNow helps IT people transform IT departments:
>> >>>> 1. A cloud service to automate IT design, transition and operations
>> >>>> 2. Dashboards that offer high-level views of enterprise services
>> >>>> 3. A single system of record for all IT processes
>> >>>> http://p.sf.net/sfu/servicenow-d2d-j
>> >>>> _______________________________________________
>> >>>> Csound-devel mailing list
>> >>>> Csound-devel@lists.sourceforge.net
>> >>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>>>
>> >>>
>> >>>
>> >>>
>> >>> ------------------------------------------------------------------------------
>> >>> How ServiceNow helps IT people transform IT departments:
>> >>> 1. A cloud service to automate IT design, transition and operations
>> >>> 2. Dashboards that offer high-level views of enterprise services
>> >>> 3. A single system of record for all IT processes
>> >>> http://p.sf.net/sfu/servicenow-d2d-j
>> >>> _______________________________________________
>> >>> Csound-devel mailing list
>> >>> Csound-devel@lists.sourceforge.net
>> >>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>> >>
>> >>
>> >>
>> >> ------------------------------------------------------------------------------
>> >> How ServiceNow helps IT people transform IT departments:
>> >> 1. A cloud service to automate IT design, transition and operations
>> >> 2. Dashboards that offer high-level views of enterprise services
>> >> 3. A single system of record for all IT processes
>> >> http://p.sf.net/sfu/servicenow-d2d-j
>> >> _______________________________________________
>> >> Csound-devel mailing list
>> >> Csound-devel@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > How ServiceNow helps IT people transform IT departments:
>> > 1. A cloud service to automate IT design, transition and operations
>> > 2. Dashboards that offer high-level views of enterprise services
>> > 3. A single system of record for all IT processes
>> > http://p.sf.net/sfu/servicenow-d2d-j
>> > _______________________________________________
>> > Csound-devel mailing list
>> > Csound-devel@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>> Dr Victor Lazzarini
>> Senior Lecturer
>> Dept. of Music
>> NUI Maynooth Ireland
>> tel.: +353 1 708 3545
>> Victor dot Lazzarini AT nuim dot ie
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> How ServiceNow helps IT people transform IT departments:
>> 1. A cloud service to automate IT design, transition and operations
>> 2. Dashboards that offer high-level views of enterprise services
>> 3. A single system of record for all IT processes
>> http://p.sf.net/sfu/servicenow-d2d-j
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
> ------------------------------------------------------------------------------
> How ServiceNow helps IT people transform IT departments:
> 1. A cloud service to automate IT design, transition and operations
> 2. Dashboards that offer high-level views of enterprise services
> 3. A single system of record for all IT processes
> http://p.sf.net/sfu/servicenow-d2d-j
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



Date2013-06-07 14:56
FromMichael Gogins
SubjectRe: [Cs-dev] Android Csound 6 - loading plugins
AttachmentsNone  None  
But actually, getEnv is returning the value as set by setGlobalEnv, at least the second time the CsoundObj is created anyway.

Regards,
Mike

Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Jun 7, 2013 at 9:55 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
Oh dear, looks like by renaming things I removed the CsoundAppActivity.java code from Git, I won't be able to put it back till this evening...

Here's the code from the earlier revision:
startStopButton = (ToggleButton) findViewById(R.id.runButton);
startStopButton.setOnClickListener(new OnClickListener() {
public synchronized void onClick(View v) {
if (csd == null) {
startStopButton.toggle();
return;
}
if (startStopButton.isChecked()) {
csound = new CsoundObj();
csound.messagePoster = CsoundAppActivity.this;
csound.setMessageLoggingEnabled(true);
// Make sure this stuff really got packaged.
// We can interrogate the shared libs dir the same way
// to see what architecture is running.
String samples[] = null;
String armeabi[] = null;
String armeabi_v7a[] = null;
try {
samples = getAssets().list("samples");
armeabi = getAssets().list("armeabi/OPCODE6DIR");
armeabi_v7a = getAssets().list("armeabi-v7a/OPCODE6DIR");
} catch (IOException e) {
e.printStackTrace();
}
// We ask for the data directory in case Android changes on us without warning.
PackageInfo packageInfo = null;
try {
packageInfo = getPackageManager().getPackageInfo(getPackageName(), 0);
} catch (NameNotFoundException e) {
e.printStackTrace();
}
String channelName;
for (int i = 0; i < 5; i++) {
channelName = "slider" + (i + 1);
csound.addSlider(sliders.get(i), channelName, 0., 1.);
channelName = "butt" + (i + 1);
csound.addButton(buttons.get(i), channelName, 1);
}
csound.addButton(pad, "trackpad", 1);
csound.enableAccelerometer(CsoundAppActivity.this);
csound.addCompletionListener(CsoundAppActivity.this);
// Set Csound environment variables.
String OPCODE6DIR = packageInfo.applicationInfo.dataDir + "/assets/libs";
String SSDIR = packageInfo.applicationInfo.dataDir + "/assets/samples";
csound.getCsound().SetGlobalEnv("OPCODE6DIR", OPCODE6DIR);
csound.getCsound().SetGlobalEnv("SSDIR", SSDIR);
csound.startCsound(csd);
postMessageClear("Csound is starting...\n");
csound.getCsound().Message("OPCODE6DIR has been set to: " + csound.getCsound().GetEnv("OPCODE6DIR") + "\n");
csound.getCsound().Message("SSDIR has been set to: " + csound.getCsound().GetEnv("SSDIR") + "\n");
} else {
csound.stopCsound();
postMessage("Csound has been stopped.\n");
}
}
});




Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Jun 7, 2013 at 9:31 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
It's floats, so it should be OPCODE6DIR, but you could set both.

I'll look again at the Csound set env code to see if I can spot anything. Could you outline here the sequence of API calls?

On 7 Jun 2013, at 12:41, Michael Gogins wrote:

Thanks for the quick change.

Unfortunately, it's still not working. The value of OPCODE6DIR is now returned as I expect from getEnv after starting Csound, but still no load.

Is this "float" or "double" Csound here? Should it be OPCODE6DIR64 instead of just OPCODE6DIR?

Anyway, the code is cleaned up a bit, made consistent, and checked in, so you should be download and debug. In the debugger you can inspect what getAssets returns and see that the files are indeed where OPCODE6DIR says they should be.

BTW, I renamed CsoundApp.apk to Csound6.apk.

Regards,
Mike





Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Jun 7, 2013 at 2:32 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Try it now with code from GIT. I made some changes that should prevent any resetting to happen when Csound is created.

Victor

On 7 Jun 2013, at 04:19, Michael Gogins wrote:

I changed the location,  but in my tests it is consistent,  and I verify it by printing out the directory listing from the device in the debugger.

I note that if I call set global env then start Csound Then get env, it returns null. That can't be right. ..

On Jun 6, 2013 10:54 PM, "Steven Yi" <stevenyi@gmail.com> wrote:
Hi Michael,

I took a quick look and had some questions:

1. This seems to be setting the libs to a folder different than what
you're looking for with the list() calls:

String OPCODE6DIR = packageInfo.applicationInfo.dataDir + "/assets/libs";

Shouldn't that be "/assets/armeabi-v7a/OPCODE6DIR" ?


2. For your generated APK file, could you to a "tar tzvf
CSDPlayer.apk" to list the contents and post it here?

Thanks!
steven

p.s. - I'm going on a long drive tomorrow and again on Sunday, so I'll
be off and on the internet the next few days.

On Thu, Jun 6, 2013 at 8:14 PM, Michael Gogins <michael.gogins@gmail.com> wrote:
> I think there may be a difference in that Csound 5 has PreCompile and Csound
> 6 does not... Csound is acting like it forgets the global env I have set.
> I've booked in my code for you all to play with.
>
> Regards,
> Mike
>
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Thu, Jun 6, 2013 at 10:03 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie>
> wrote:
>>
>> Plugins do not normally depend on libsndfile (I changed this ages ago). I
>> think it is more likely that the
>> plugin library was not found. One thing to try is to use --opcode-lib= to
>> load it from the CSDPlayer,
>> placing the plugin in the same dir as the CSD (for convenience).
>>
>> On 6 Jun 2013, at 14:53, Steven Yi wrote:
>>
>> > Just FYI, the way libcsoundandroid.so builds (or did, haven't gotten
>> > to building since the build file changes), it linked in libsndfile
>> > statically so that that libcsoundandroid has both libcsound and
>> > libsndfile into one lib.  I think that was done at the time to just
>> > make it easier to have one lib to distribute, but it'd be fine to
>> > change that to split to libs.
>> >
>> > Can't think of anything else that might be a hint.  I'll wait until
>> > the code is checked in and will look at building/testing here.
>> > Hopefully it's something simple. :)
>> >
>> > On Thu, Jun 6, 2013 at 9:43 AM, Michael Gogins
>> > <michael.gogins@gmail.com> wrote:
>> >> Yes, I was trying with fluidsynth.
>> >>
>> >> Michael Gogins
>> >> Irreducible Productions
>> >> http://michaelgogins.tumblr.com
>> >> Michael dot Gogins at gmail dot com
>> >>
>> >>
>> >> On Thu, Jun 6, 2013 at 9:38 AM, Steven Yi <stevenyi@gmail.com> wrote:
>> >>>
>> >>> Well we eliminate some variables.  I know that the fluidsynth opcode
>> >>> libs built and loaded, as did the stdutil library.  I had tested and
>> >>> got these both to load and run.  If you test with just those
>> >>> libraries, that will eliminate some variables and just leave it to
>> >>> getting the correct path.
>> >>>
>> >>> On Thu, Jun 6, 2013 at 9:32 AM, Michael Gogins
>> >>> <michael.gogins@gmail.com>
>> >>> wrote:
>> >>>> There may be local shared libs I need:
>> >>>>
>> >>>>
>> >>>>
>> >>>> http://stackoverflow.com/questions/11444039/why-am-i-not-able-to-use-my-function-that-is-declared-in-so-library
>> >>>>
>> >>>> Regards,
>> >>>> Mike
>> >>>>
>> >>>> Michael Gogins
>> >>>> Irreducible Productions
>> >>>> http://michaelgogins.tumblr.com
>> >>>> Michael dot Gogins at gmail dot com
>> >>>>
>> >>>>
>> >>>> On Thu, Jun 6, 2013 at 9:18 AM, Michael Gogins
>> >>>> <michael.gogins@gmail.com>
>> >>>> wrote:
>> >>>>>
>> >>>>> I put the dynamically loaded shared libraries in
>> >>>>> assets/armeabi/OPCODE6DIR
>> >>>>> and in assets/armeabi-v7a/OPCODE6DIR.
>> >>>>>
>> >>>>> I put in code to verify that the files actually are in these
>> >>>>> locations
>> >>>>> (they are).
>> >>>>>
>> >>>>> I put in to code to call SetGlobalEnv("OPCODE6DIR",
>> >>>>> "/data/data/assets/aremabi-v7a") just before I call
>> >>>>> CsoundObj.startCsound().
>> >>>>>
>> >>>>> I put in code to verify that the pathname is correct (it is).
>> >>>>>
>> >>>>> No dice... any ideas?
>> >>>>>
>> >>>>> Is it that the global env gets wiped out by the
>> >>>>> CsoundAndroid.Compile()
>> >>>>> call?
>> >>>>>
>> >>>>> Is it something to do with Android permissions?
>> >>>>>
>> >>>>> Is it something to do with dependent libraries like stlport or
>> >>>>> something?
>> >>>>>
>> >>>>> How does one debug C code running on the device?
>> >>>>>
>> >>>>> Regards,
>> >>>>> Mike
>> >>>>>
>> >>>>> Michael Gogins
>> >>>>> Irreducible Productions
>> >>>>> http://michaelgogins.tumblr.com
>> >>>>> Michael dot Gogins at gmail dot com
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>> ------------------------------------------------------------------------------
>> >>>> How ServiceNow helps IT people transform IT departments:
>> >>>> 1. A cloud service to automate IT design, transition and operations
>> >>>> 2. Dashboards that offer high-level views of enterprise services
>> >>>> 3. A single system of record for all IT processes
>> >>>> http://p.sf.net/sfu/servicenow-d2d-j
>> >>>> _______________________________________________
>> >>>> Csound-devel mailing list
>> >>>> Csound-devel@lists.sourceforge.net
>> >>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>>>
>> >>>
>> >>>
>> >>>
>> >>> ------------------------------------------------------------------------------
>> >>> How ServiceNow helps IT people transform IT departments:
>> >>> 1. A cloud service to automate IT design, transition and operations
>> >>> 2. Dashboards that offer high-level views of enterprise services
>> >>> 3. A single system of record for all IT processes
>> >>> http://p.sf.net/sfu/servicenow-d2d-j
>> >>> _______________________________________________
>> >>> Csound-devel mailing list
>> >>> Csound-devel@lists.sourceforge.net
>> >>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>> >>
>> >>
>> >>
>> >> ------------------------------------------------------------------------------
>> >> How ServiceNow helps IT people transform IT departments:
>> >> 1. A cloud service to automate IT design, transition and operations
>> >> 2. Dashboards that offer high-level views of enterprise services
>> >> 3. A single system of record for all IT processes
>> >> http://p.sf.net/sfu/servicenow-d2d-j
>> >> _______________________________________________
>> >> Csound-devel mailing list
>> >> Csound-devel@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > How ServiceNow helps IT people transform IT departments:
>> > 1. A cloud service to automate IT design, transition and operations
>> > 2. Dashboards that offer high-level views of enterprise services
>> > 3. A single system of record for all IT processes
>> > http://p.sf.net/sfu/servicenow-d2d-j
>> > _______________________________________________
>> > Csound-devel mailing list
>> > Csound-devel@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>> Dr Victor Lazzarini
>> Senior Lecturer
>> Dept. of Music
>> NUI Maynooth Ireland
>> tel.: +353 1 708 3545
>> Victor dot Lazzarini AT nuim dot ie
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> How ServiceNow helps IT people transform IT departments:
>> 1. A cloud service to automate IT design, transition and operations
>> 2. Dashboards that offer high-level views of enterprise services
>> 3. A single system of record for all IT processes
>> http://p.sf.net/sfu/servicenow-d2d-j
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
> ------------------------------------------------------------------------------
> How ServiceNow helps IT people transform IT departments:
> 1. A cloud service to automate IT design, transition and operations
> 2. Dashboards that offer high-level views of enterprise services
> 3. A single system of record for all IT processes
> http://p.sf.net/sfu/servicenow-d2d-j
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel




Date2013-06-07 15:03
FromVictor Lazzarini
SubjectRe: [Cs-dev] Android Csound 6 - loading plugins
AttachmentsNone  None  
I thought it was null?
On 7 Jun 2013, at 14:56, Michael Gogins wrote:

But actually, getEnv is returning the value as set by setGlobalEnv, at least the second time the CsoundObj is created anyway.

Regards,
Mike

Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Jun 7, 2013 at 9:55 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
Oh dear, looks like by renaming things I removed the CsoundAppActivity.java code from Git, I won't be able to put it back till this evening...

Here's the code from the earlier revision:
startStopButton = (ToggleButton) findViewById(R.id.runButton);
startStopButton.setOnClickListener(new OnClickListener() {
public synchronized void onClick(View v) {
if (csd == null) {
startStopButton.toggle();
return;
}
if (startStopButton.isChecked()) {
csound = new CsoundObj();
csound.messagePoster = CsoundAppActivity.this;
csound.setMessageLoggingEnabled(true);
// Make sure this stuff really got packaged.
// We can interrogate the shared libs dir the same way
// to see what architecture is running.
String samples[] = null;
String armeabi[] = null;
String armeabi_v7a[] = null;
try {
samples = getAssets().list("samples");
armeabi = getAssets().list("armeabi/OPCODE6DIR");
armeabi_v7a = getAssets().list("armeabi-v7a/OPCODE6DIR");
} catch (IOException e) {
e.printStackTrace();
}
// We ask for the data directory in case Android changes on us without warning.
PackageInfo packageInfo = null;
try {
packageInfo = getPackageManager().getPackageInfo(getPackageName(), 0);
} catch (NameNotFoundException e) {
e.printStackTrace();
}
String channelName;
for (int i = 0; i < 5; i++) {
channelName = "slider" + (i + 1);
csound.addSlider(sliders.get(i), channelName, 0., 1.);
channelName = "butt" + (i + 1);
csound.addButton(buttons.get(i), channelName, 1);
}
csound.addButton(pad, "trackpad", 1);
csound.enableAccelerometer(CsoundAppActivity.this);
csound.addCompletionListener(CsoundAppActivity.this);
// Set Csound environment variables.
String OPCODE6DIR = packageInfo.applicationInfo.dataDir + "/assets/libs";
String SSDIR = packageInfo.applicationInfo.dataDir + "/assets/samples";
csound.getCsound().SetGlobalEnv("OPCODE6DIR", OPCODE6DIR);
csound.getCsound().SetGlobalEnv("SSDIR", SSDIR);
csound.startCsound(csd);
postMessageClear("Csound is starting...\n");
csound.getCsound().Message("OPCODE6DIR has been set to: " + csound.getCsound().GetEnv("OPCODE6DIR") + "\n");
csound.getCsound().Message("SSDIR has been set to: " + csound.getCsound().GetEnv("SSDIR") + "\n");
} else {
csound.stopCsound();
postMessage("Csound has been stopped.\n");
}
}
});




Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Jun 7, 2013 at 9:31 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
It's floats, so it should be OPCODE6DIR, but you could set both.

I'll look again at the Csound set env code to see if I can spot anything. Could you outline here the sequence of API calls?

On 7 Jun 2013, at 12:41, Michael Gogins wrote:

Thanks for the quick change.

Unfortunately, it's still not working. The value of OPCODE6DIR is now returned as I expect from getEnv after starting Csound, but still no load.

Is this "float" or "double" Csound here? Should it be OPCODE6DIR64 instead of just OPCODE6DIR?

Anyway, the code is cleaned up a bit, made consistent, and checked in, so you should be download and debug. In the debugger you can inspect what getAssets returns and see that the files are indeed where OPCODE6DIR says they should be.

BTW, I renamed CsoundApp.apk to Csound6.apk.

Regards,
Mike





Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Jun 7, 2013 at 2:32 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Try it now with code from GIT. I made some changes that should prevent any resetting to happen when Csound is created.

Victor

On 7 Jun 2013, at 04:19, Michael Gogins wrote:

I changed the location,  but in my tests it is consistent,  and I verify it by printing out the directory listing from the device in the debugger.

I note that if I call set global env then start Csound Then get env, it returns null. That can't be right. ..

On Jun 6, 2013 10:54 PM, "Steven Yi" <stevenyi@gmail.com> wrote:
Hi Michael,

I took a quick look and had some questions:

1. This seems to be setting the libs to a folder different than what
you're looking for with the list() calls:

String OPCODE6DIR = packageInfo.applicationInfo.dataDir + "/assets/libs";

Shouldn't that be "/assets/armeabi-v7a/OPCODE6DIR" ?


2. For your generated APK file, could you to a "tar tzvf
CSDPlayer.apk" to list the contents and post it here?

Thanks!
steven

p.s. - I'm going on a long drive tomorrow and again on Sunday, so I'll
be off and on the internet the next few days.

On Thu, Jun 6, 2013 at 8:14 PM, Michael Gogins <michael.gogins@gmail.com> wrote:
> I think there may be a difference in that Csound 5 has PreCompile and Csound
> 6 does not... Csound is acting like it forgets the global env I have set.
> I've booked in my code for you all to play with.
>
> Regards,
> Mike
>
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Thu, Jun 6, 2013 at 10:03 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie>
> wrote:
>>
>> Plugins do not normally depend on libsndfile (I changed this ages ago). I
>> think it is more likely that the
>> plugin library was not found. One thing to try is to use --opcode-lib= to
>> load it from the CSDPlayer,
>> placing the plugin in the same dir as the CSD (for convenience).
>>
>> On 6 Jun 2013, at 14:53, Steven Yi wrote:
>>
>> > Just FYI, the way libcsoundandroid.so builds (or did, haven't gotten
>> > to building since the build file changes), it linked in libsndfile
>> > statically so that that libcsoundandroid has both libcsound and
>> > libsndfile into one lib.  I think that was done at the time to just
>> > make it easier to have one lib to distribute, but it'd be fine to
>> > change that to split to libs.
>> >
>> > Can't think of anything else that might be a hint.  I'll wait until
>> > the code is checked in and will look at building/testing here.
>> > Hopefully it's something simple. :)
>> >
>> > On Thu, Jun 6, 2013 at 9:43 AM, Michael Gogins
>> > <michael.gogins@gmail.com> wrote:
>> >> Yes, I was trying with fluidsynth.
>> >>
>> >> Michael Gogins
>> >> Irreducible Productions
>> >> http://michaelgogins.tumblr.com
>> >> Michael dot Gogins at gmail dot com
>> >>
>> >>
>> >> On Thu, Jun 6, 2013 at 9:38 AM, Steven Yi <stevenyi@gmail.com> wrote:
>> >>>
>> >>> Well we eliminate some variables.  I know that the fluidsynth opcode
>> >>> libs built and loaded, as did the stdutil library.  I had tested and
>> >>> got these both to load and run.  If you test with just those
>> >>> libraries, that will eliminate some variables and just leave it to
>> >>> getting the correct path.
>> >>>
>> >>> On Thu, Jun 6, 2013 at 9:32 AM, Michael Gogins
>> >>> <michael.gogins@gmail.com>
>> >>> wrote:
>> >>>> There may be local shared libs I need:
>> >>>>
>> >>>>
>> >>>>
>> >>>> http://stackoverflow.com/questions/11444039/why-am-i-not-able-to-use-my-function-that-is-declared-in-so-library
>> >>>>
>> >>>> Regards,
>> >>>> Mike
>> >>>>
>> >>>> Michael Gogins
>> >>>> Irreducible Productions
>> >>>> http://michaelgogins.tumblr.com
>> >>>> Michael dot Gogins at gmail dot com
>> >>>>
>> >>>>
>> >>>> On Thu, Jun 6, 2013 at 9:18 AM, Michael Gogins
>> >>>> <michael.gogins@gmail.com>
>> >>>> wrote:
>> >>>>>
>> >>>>> I put the dynamically loaded shared libraries in
>> >>>>> assets/armeabi/OPCODE6DIR
>> >>>>> and in assets/armeabi-v7a/OPCODE6DIR.
>> >>>>>
>> >>>>> I put in code to verify that the files actually are in these
>> >>>>> locations
>> >>>>> (they are).
>> >>>>>
>> >>>>> I put in to code to call SetGlobalEnv("OPCODE6DIR",
>> >>>>> "/data/data/assets/aremabi-v7a") just before I call
>> >>>>> CsoundObj.startCsound().
>> >>>>>
>> >>>>> I put in code to verify that the pathname is correct (it is).
>> >>>>>
>> >>>>> No dice... any ideas?
>> >>>>>
>> >>>>> Is it that the global env gets wiped out by the
>> >>>>> CsoundAndroid.Compile()
>> >>>>> call?
>> >>>>>
>> >>>>> Is it something to do with Android permissions?
>> >>>>>
>> >>>>> Is it something to do with dependent libraries like stlport or
>> >>>>> something?
>> >>>>>
>> >>>>> How does one debug C code running on the device?
>> >>>>>
>> >>>>> Regards,
>> >>>>> Mike
>> >>>>>
>> >>>>> Michael Gogins
>> >>>>> Irreducible Productions
>> >>>>> http://michaelgogins.tumblr.com
>> >>>>> Michael dot Gogins at gmail dot com
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>> ------------------------------------------------------------------------------
>> >>>> How ServiceNow helps IT people transform IT departments:
>> >>>> 1. A cloud service to automate IT design, transition and operations
>> >>>> 2. Dashboards that offer high-level views of enterprise services
>> >>>> 3. A single system of record for all IT processes
>> >>>> http://p.sf.net/sfu/servicenow-d2d-j
>> >>>> _______________________________________________
>> >>>> Csound-devel mailing list
>> >>>> Csound-devel@lists.sourceforge.net
>> >>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>>>
>> >>>
>> >>>
>> >>>
>> >>> ------------------------------------------------------------------------------
>> >>> How ServiceNow helps IT people transform IT departments:
>> >>> 1. A cloud service to automate IT design, transition and operations
>> >>> 2. Dashboards that offer high-level views of enterprise services
>> >>> 3. A single system of record for all IT processes
>> >>> http://p.sf.net/sfu/servicenow-d2d-j
>> >>> _______________________________________________
>> >>> Csound-devel mailing list
>> >>> Csound-devel@lists.sourceforge.net
>> >>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>> >>
>> >>
>> >>
>> >> ------------------------------------------------------------------------------
>> >> How ServiceNow helps IT people transform IT departments:
>> >> 1. A cloud service to automate IT design, transition and operations
>> >> 2. Dashboards that offer high-level views of enterprise services
>> >> 3. A single system of record for all IT processes
>> >> http://p.sf.net/sfu/servicenow-d2d-j
>> >> _______________________________________________
>> >> Csound-devel mailing list
>> >> Csound-devel@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > How ServiceNow helps IT people transform IT departments:
>> > 1. A cloud service to automate IT design, transition and operations
>> > 2. Dashboards that offer high-level views of enterprise services
>> > 3. A single system of record for all IT processes
>> > http://p.sf.net/sfu/servicenow-d2d-j
>> > _______________________________________________
>> > Csound-devel mailing list
>> > Csound-devel@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>> Dr Victor Lazzarini
>> Senior Lecturer
>> Dept. of Music
>> NUI Maynooth Ireland
>> tel.: +353 1 708 3545
>> Victor dot Lazzarini AT nuim dot ie
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> How ServiceNow helps IT people transform IT departments:
>> 1. A cloud service to automate IT design, transition and operations
>> 2. Dashboards that offer high-level views of enterprise services
>> 3. A single system of record for all IT processes
>> http://p.sf.net/sfu/servicenow-d2d-j
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
> ------------------------------------------------------------------------------
> How ServiceNow helps IT people transform IT departments:
> 1. A cloud service to automate IT design, transition and operations
> 2. Dashboards that offer high-level views of enterprise services
> 3. A single system of record for all IT processes
> http://p.sf.net/sfu/servicenow-d2d-j
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




Date2013-06-07 15:06
FromVictor Lazzarini
SubjectRe: [Cs-dev] Android Csound 6 - loading plugins
AttachmentsNone  None  
Maybe you should call csoundSetGlobalEnv(const char *name, const char *value) before creating CsoundObj()?


On 7 Jun 2013, at 14:56, Michael Gogins wrote:

But actually, getEnv is returning the value as set by setGlobalEnv, at least the second time the CsoundObj is created anyway.

Regards,
Mike

Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Jun 7, 2013 at 9:55 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
Oh dear, looks like by renaming things I removed the CsoundAppActivity.java code from Git, I won't be able to put it back till this evening...

Here's the code from the earlier revision:
startStopButton = (ToggleButton) findViewById(R.id.runButton);
startStopButton.setOnClickListener(new OnClickListener() {
public synchronized void onClick(View v) {
if (csd == null) {
startStopButton.toggle();
return;
}
if (startStopButton.isChecked()) {
csound = new CsoundObj();
csound.messagePoster = CsoundAppActivity.this;
csound.setMessageLoggingEnabled(true);
// Make sure this stuff really got packaged.
// We can interrogate the shared libs dir the same way
// to see what architecture is running.
String samples[] = null;
String armeabi[] = null;
String armeabi_v7a[] = null;
try {
samples = getAssets().list("samples");
armeabi = getAssets().list("armeabi/OPCODE6DIR");
armeabi_v7a = getAssets().list("armeabi-v7a/OPCODE6DIR");
} catch (IOException e) {
e.printStackTrace();
}
// We ask for the data directory in case Android changes on us without warning.
PackageInfo packageInfo = null;
try {
packageInfo = getPackageManager().getPackageInfo(getPackageName(), 0);
} catch (NameNotFoundException e) {
e.printStackTrace();
}
String channelName;
for (int i = 0; i < 5; i++) {
channelName = "slider" + (i + 1);
csound.addSlider(sliders.get(i), channelName, 0., 1.);
channelName = "butt" + (i + 1);
csound.addButton(buttons.get(i), channelName, 1);
}
csound.addButton(pad, "trackpad", 1);
csound.enableAccelerometer(CsoundAppActivity.this);
csound.addCompletionListener(CsoundAppActivity.this);
// Set Csound environment variables.
String OPCODE6DIR = packageInfo.applicationInfo.dataDir + "/assets/libs";
String SSDIR = packageInfo.applicationInfo.dataDir + "/assets/samples";
csound.getCsound().SetGlobalEnv("OPCODE6DIR", OPCODE6DIR);
csound.getCsound().SetGlobalEnv("SSDIR", SSDIR);
csound.startCsound(csd);
postMessageClear("Csound is starting...\n");
csound.getCsound().Message("OPCODE6DIR has been set to: " + csound.getCsound().GetEnv("OPCODE6DIR") + "\n");
csound.getCsound().Message("SSDIR has been set to: " + csound.getCsound().GetEnv("SSDIR") + "\n");
} else {
csound.stopCsound();
postMessage("Csound has been stopped.\n");
}
}
});




Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Jun 7, 2013 at 9:31 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
It's floats, so it should be OPCODE6DIR, but you could set both.

I'll look again at the Csound set env code to see if I can spot anything. Could you outline here the sequence of API calls?

On 7 Jun 2013, at 12:41, Michael Gogins wrote:

Thanks for the quick change.

Unfortunately, it's still not working. The value of OPCODE6DIR is now returned as I expect from getEnv after starting Csound, but still no load.

Is this "float" or "double" Csound here? Should it be OPCODE6DIR64 instead of just OPCODE6DIR?

Anyway, the code is cleaned up a bit, made consistent, and checked in, so you should be download and debug. In the debugger you can inspect what getAssets returns and see that the files are indeed where OPCODE6DIR says they should be.

BTW, I renamed CsoundApp.apk to Csound6.apk.

Regards,
Mike





Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Jun 7, 2013 at 2:32 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Try it now with code from GIT. I made some changes that should prevent any resetting to happen when Csound is created.

Victor

On 7 Jun 2013, at 04:19, Michael Gogins wrote:

I changed the location,  but in my tests it is consistent,  and I verify it by printing out the directory listing from the device in the debugger.

I note that if I call set global env then start Csound Then get env, it returns null. That can't be right. ..

On Jun 6, 2013 10:54 PM, "Steven Yi" <stevenyi@gmail.com> wrote:
Hi Michael,

I took a quick look and had some questions:

1. This seems to be setting the libs to a folder different than what
you're looking for with the list() calls:

String OPCODE6DIR = packageInfo.applicationInfo.dataDir + "/assets/libs";

Shouldn't that be "/assets/armeabi-v7a/OPCODE6DIR" ?


2. For your generated APK file, could you to a "tar tzvf
CSDPlayer.apk" to list the contents and post it here?

Thanks!
steven

p.s. - I'm going on a long drive tomorrow and again on Sunday, so I'll
be off and on the internet the next few days.

On Thu, Jun 6, 2013 at 8:14 PM, Michael Gogins <michael.gogins@gmail.com> wrote:
> I think there may be a difference in that Csound 5 has PreCompile and Csound
> 6 does not... Csound is acting like it forgets the global env I have set.
> I've booked in my code for you all to play with.
>
> Regards,
> Mike
>
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Thu, Jun 6, 2013 at 10:03 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie>
> wrote:
>>
>> Plugins do not normally depend on libsndfile (I changed this ages ago). I
>> think it is more likely that the
>> plugin library was not found. One thing to try is to use --opcode-lib= to
>> load it from the CSDPlayer,
>> placing the plugin in the same dir as the CSD (for convenience).
>>
>> On 6 Jun 2013, at 14:53, Steven Yi wrote:
>>
>> > Just FYI, the way libcsoundandroid.so builds (or did, haven't gotten
>> > to building since the build file changes), it linked in libsndfile
>> > statically so that that libcsoundandroid has both libcsound and
>> > libsndfile into one lib.  I think that was done at the time to just
>> > make it easier to have one lib to distribute, but it'd be fine to
>> > change that to split to libs.
>> >
>> > Can't think of anything else that might be a hint.  I'll wait until
>> > the code is checked in and will look at building/testing here.
>> > Hopefully it's something simple. :)
>> >
>> > On Thu, Jun 6, 2013 at 9:43 AM, Michael Gogins
>> > <michael.gogins@gmail.com> wrote:
>> >> Yes, I was trying with fluidsynth.
>> >>
>> >> Michael Gogins
>> >> Irreducible Productions
>> >> http://michaelgogins.tumblr.com
>> >> Michael dot Gogins at gmail dot com
>> >>
>> >>
>> >> On Thu, Jun 6, 2013 at 9:38 AM, Steven Yi <stevenyi@gmail.com> wrote:
>> >>>
>> >>> Well we eliminate some variables.  I know that the fluidsynth opcode
>> >>> libs built and loaded, as did the stdutil library.  I had tested and
>> >>> got these both to load and run.  If you test with just those
>> >>> libraries, that will eliminate some variables and just leave it to
>> >>> getting the correct path.
>> >>>
>> >>> On Thu, Jun 6, 2013 at 9:32 AM, Michael Gogins
>> >>> <michael.gogins@gmail.com>
>> >>> wrote:
>> >>>> There may be local shared libs I need:
>> >>>>
>> >>>>
>> >>>>
>> >>>> http://stackoverflow.com/questions/11444039/why-am-i-not-able-to-use-my-function-that-is-declared-in-so-library
>> >>>>
>> >>>> Regards,
>> >>>> Mike
>> >>>>
>> >>>> Michael Gogins
>> >>>> Irreducible Productions
>> >>>> http://michaelgogins.tumblr.com
>> >>>> Michael dot Gogins at gmail dot com
>> >>>>
>> >>>>
>> >>>> On Thu, Jun 6, 2013 at 9:18 AM, Michael Gogins
>> >>>> <michael.gogins@gmail.com>
>> >>>> wrote:
>> >>>>>
>> >>>>> I put the dynamically loaded shared libraries in
>> >>>>> assets/armeabi/OPCODE6DIR
>> >>>>> and in assets/armeabi-v7a/OPCODE6DIR.
>> >>>>>
>> >>>>> I put in code to verify that the files actually are in these
>> >>>>> locations
>> >>>>> (they are).
>> >>>>>
>> >>>>> I put in to code to call SetGlobalEnv("OPCODE6DIR",
>> >>>>> "/data/data/assets/aremabi-v7a") just before I call
>> >>>>> CsoundObj.startCsound().
>> >>>>>
>> >>>>> I put in code to verify that the pathname is correct (it is).
>> >>>>>
>> >>>>> No dice... any ideas?
>> >>>>>
>> >>>>> Is it that the global env gets wiped out by the
>> >>>>> CsoundAndroid.Compile()
>> >>>>> call?
>> >>>>>
>> >>>>> Is it something to do with Android permissions?
>> >>>>>
>> >>>>> Is it something to do with dependent libraries like stlport or
>> >>>>> something?
>> >>>>>
>> >>>>> How does one debug C code running on the device?
>> >>>>>
>> >>>>> Regards,
>> >>>>> Mike
>> >>>>>
>> >>>>> Michael Gogins
>> >>>>> Irreducible Productions
>> >>>>> http://michaelgogins.tumblr.com
>> >>>>> Michael dot Gogins at gmail dot com
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>> ------------------------------------------------------------------------------
>> >>>> How ServiceNow helps IT people transform IT departments:
>> >>>> 1. A cloud service to automate IT design, transition and operations
>> >>>> 2. Dashboards that offer high-level views of enterprise services
>> >>>> 3. A single system of record for all IT processes
>> >>>> http://p.sf.net/sfu/servicenow-d2d-j
>> >>>> _______________________________________________
>> >>>> Csound-devel mailing list
>> >>>> Csound-devel@lists.sourceforge.net
>> >>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>>>
>> >>>
>> >>>
>> >>>
>> >>> ------------------------------------------------------------------------------
>> >>> How ServiceNow helps IT people transform IT departments:
>> >>> 1. A cloud service to automate IT design, transition and operations
>> >>> 2. Dashboards that offer high-level views of enterprise services
>> >>> 3. A single system of record for all IT processes
>> >>> http://p.sf.net/sfu/servicenow-d2d-j
>> >>> _______________________________________________
>> >>> Csound-devel mailing list
>> >>> Csound-devel@lists.sourceforge.net
>> >>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>> >>
>> >>
>> >>
>> >> ------------------------------------------------------------------------------
>> >> How ServiceNow helps IT people transform IT departments:
>> >> 1. A cloud service to automate IT design, transition and operations
>> >> 2. Dashboards that offer high-level views of enterprise services
>> >> 3. A single system of record for all IT processes
>> >> http://p.sf.net/sfu/servicenow-d2d-j
>> >> _______________________________________________
>> >> Csound-devel mailing list
>> >> Csound-devel@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > How ServiceNow helps IT people transform IT departments:
>> > 1. A cloud service to automate IT design, transition and operations
>> > 2. Dashboards that offer high-level views of enterprise services
>> > 3. A single system of record for all IT processes
>> > http://p.sf.net/sfu/servicenow-d2d-j
>> > _______________________________________________
>> > Csound-devel mailing list
>> > Csound-devel@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>> Dr Victor Lazzarini
>> Senior Lecturer
>> Dept. of Music
>> NUI Maynooth Ireland
>> tel.: +353 1 708 3545
>> Victor dot Lazzarini AT nuim dot ie
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> How ServiceNow helps IT people transform IT departments:
>> 1. A cloud service to automate IT design, transition and operations
>> 2. Dashboards that offer high-level views of enterprise services
>> 3. A single system of record for all IT processes
>> http://p.sf.net/sfu/servicenow-d2d-j
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
> ------------------------------------------------------------------------------
> How ServiceNow helps IT people transform IT departments:
> 1. A cloud service to automate IT design, transition and operations
> 2. Dashboards that offer high-level views of enterprise services
> 3. A single system of record for all IT processes
> http://p.sf.net/sfu/servicenow-d2d-j
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




Date2013-06-07 15:23
FromMichael Gogins
SubjectRe: [Cs-dev] Android Csound 6 - loading plugins
AttachmentsNone  None  
OK, I'll try that.

I've been googling for dlopen on Android. Information is spotty and I think unreliable, but my impression is certainly that dlopen the way Csound does it should work. 

There was one report that dlsym would return an error but also the correct function address, so maybe we should fix up the module loading code to take that into account. I'll put in some debug printouts in that later. And do more googling...


Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Jun 7, 2013 at 10:06 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Maybe you should call csoundSetGlobalEnv(const char *name, const char *value) before creating CsoundObj()?


On 7 Jun 2013, at 14:56, Michael Gogins wrote:

But actually, getEnv is returning the value as set by setGlobalEnv, at least the second time the CsoundObj is created anyway.

Regards,
Mike

Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Jun 7, 2013 at 9:55 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
Oh dear, looks like by renaming things I removed the CsoundAppActivity.java code from Git, I won't be able to put it back till this evening...

Here's the code from the earlier revision:
startStopButton = (ToggleButton) findViewById(R.id.runButton);
startStopButton.setOnClickListener(new OnClickListener() {
public synchronized void onClick(View v) {
if (csd == null) {
startStopButton.toggle();
return;
}
if (startStopButton.isChecked()) {
csound = new CsoundObj();
csound.messagePoster = CsoundAppActivity.this;
csound.setMessageLoggingEnabled(true);
// Make sure this stuff really got packaged.
// We can interrogate the shared libs dir the same way
// to see what architecture is running.
String samples[] = null;
String armeabi[] = null;
String armeabi_v7a[] = null;
try {
samples = getAssets().list("samples");
armeabi = getAssets().list("armeabi/OPCODE6DIR");
armeabi_v7a = getAssets().list("armeabi-v7a/OPCODE6DIR");
} catch (IOException e) {
e.printStackTrace();
}
// We ask for the data directory in case Android changes on us without warning.
PackageInfo packageInfo = null;
try {
packageInfo = getPackageManager().getPackageInfo(getPackageName(), 0);
} catch (NameNotFoundException e) {
e.printStackTrace();
}
String channelName;
for (int i = 0; i < 5; i++) {
channelName = "slider" + (i + 1);
csound.addSlider(sliders.get(i), channelName, 0., 1.);
channelName = "butt" + (i + 1);
csound.addButton(buttons.get(i), channelName, 1);
}
csound.addButton(pad, "trackpad", 1);
csound.enableAccelerometer(CsoundAppActivity.this);
csound.addCompletionListener(CsoundAppActivity.this);
// Set Csound environment variables.
String OPCODE6DIR = packageInfo.applicationInfo.dataDir + "/assets/libs";
String SSDIR = packageInfo.applicationInfo.dataDir + "/assets/samples";
csound.getCsound().SetGlobalEnv("OPCODE6DIR", OPCODE6DIR);
csound.getCsound().SetGlobalEnv("SSDIR", SSDIR);
csound.startCsound(csd);
postMessageClear("Csound is starting...\n");
csound.getCsound().Message("OPCODE6DIR has been set to: " + csound.getCsound().GetEnv("OPCODE6DIR") + "\n");
csound.getCsound().Message("SSDIR has been set to: " + csound.getCsound().GetEnv("SSDIR") + "\n");
} else {
csound.stopCsound();
postMessage("Csound has been stopped.\n");
}
}
});




Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Jun 7, 2013 at 9:31 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
It's floats, so it should be OPCODE6DIR, but you could set both.

I'll look again at the Csound set env code to see if I can spot anything. Could you outline here the sequence of API calls?

On 7 Jun 2013, at 12:41, Michael Gogins wrote:

Thanks for the quick change.

Unfortunately, it's still not working. The value of OPCODE6DIR is now returned as I expect from getEnv after starting Csound, but still no load.

Is this "float" or "double" Csound here? Should it be OPCODE6DIR64 instead of just OPCODE6DIR?

Anyway, the code is cleaned up a bit, made consistent, and checked in, so you should be download and debug. In the debugger you can inspect what getAssets returns and see that the files are indeed where OPCODE6DIR says they should be.

BTW, I renamed CsoundApp.apk to Csound6.apk.

Regards,
Mike





Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Jun 7, 2013 at 2:32 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Try it now with code from GIT. I made some changes that should prevent any resetting to happen when Csound is created.

Victor

On 7 Jun 2013, at 04:19, Michael Gogins wrote:

I changed the location,  but in my tests it is consistent,  and I verify it by printing out the directory listing from the device in the debugger.

I note that if I call set global env then start Csound Then get env, it returns null. That can't be right. ..

On Jun 6, 2013 10:54 PM, "Steven Yi" <stevenyi@gmail.com> wrote:
Hi Michael,

I took a quick look and had some questions:

1. This seems to be setting the libs to a folder different than what
you're looking for with the list() calls:

String OPCODE6DIR = packageInfo.applicationInfo.dataDir + "/assets/libs";

Shouldn't that be "/assets/armeabi-v7a/OPCODE6DIR" ?


2. For your generated APK file, could you to a "tar tzvf
CSDPlayer.apk" to list the contents and post it here?

Thanks!
steven

p.s. - I'm going on a long drive tomorrow and again on Sunday, so I'll
be off and on the internet the next few days.

On Thu, Jun 6, 2013 at 8:14 PM, Michael Gogins <michael.gogins@gmail.com> wrote:
> I think there may be a difference in that Csound 5 has PreCompile and Csound
> 6 does not... Csound is acting like it forgets the global env I have set.
> I've booked in my code for you all to play with.
>
> Regards,
> Mike
>
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Thu, Jun 6, 2013 at 10:03 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie>
> wrote:
>>
>> Plugins do not normally depend on libsndfile (I changed this ages ago). I
>> think it is more likely that the
>> plugin library was not found. One thing to try is to use --opcode-lib= to
>> load it from the CSDPlayer,
>> placing the plugin in the same dir as the CSD (for convenience).
>>
>> On 6 Jun 2013, at 14:53, Steven Yi wrote:
>>
>> > Just FYI, the way libcsoundandroid.so builds (or did, haven't gotten
>> > to building since the build file changes), it linked in libsndfile
>> > statically so that that libcsoundandroid has both libcsound and
>> > libsndfile into one lib.  I think that was done at the time to just
>> > make it easier to have one lib to distribute, but it'd be fine to
>> > change that to split to libs.
>> >
>> > Can't think of anything else that might be a hint.  I'll wait until
>> > the code is checked in and will look at building/testing here.
>> > Hopefully it's something simple. :)
>> >
>> > On Thu, Jun 6, 2013 at 9:43 AM, Michael Gogins
>> > <michael.gogins@gmail.com> wrote:
>> >> Yes, I was trying with fluidsynth.
>> >>
>> >> Michael Gogins
>> >> Irreducible Productions
>> >> http://michaelgogins.tumblr.com
>> >> Michael dot Gogins at gmail dot com
>> >>
>> >>
>> >> On Thu, Jun 6, 2013 at 9:38 AM, Steven Yi <stevenyi@gmail.com> wrote:
>> >>>
>> >>> Well we eliminate some variables.  I know that the fluidsynth opcode
>> >>> libs built and loaded, as did the stdutil library.  I had tested and
>> >>> got these both to load and run.  If you test with just those
>> >>> libraries, that will eliminate some variables and just leave it to
>> >>> getting the correct path.
>> >>>
>> >>> On Thu, Jun 6, 2013 at 9:32 AM, Michael Gogins
>> >>> <michael.gogins@gmail.com>
>> >>> wrote:
>> >>>> There may be local shared libs I need:
>> >>>>
>> >>>>
>> >>>>
>> >>>> http://stackoverflow.com/questions/11444039/why-am-i-not-able-to-use-my-function-that-is-declared-in-so-library
>> >>>>
>> >>>> Regards,
>> >>>> Mike
>> >>>>
>> >>>> Michael Gogins
>> >>>> Irreducible Productions
>> >>>> http://michaelgogins.tumblr.com
>> >>>> Michael dot Gogins at gmail dot com
>> >>>>
>> >>>>
>> >>>> On Thu, Jun 6, 2013 at 9:18 AM, Michael Gogins
>> >>>> <michael.gogins@gmail.com>
>> >>>> wrote:
>> >>>>>
>> >>>>> I put the dynamically loaded shared libraries in
>> >>>>> assets/armeabi/OPCODE6DIR
>> >>>>> and in assets/armeabi-v7a/OPCODE6DIR.
>> >>>>>
>> >>>>> I put in code to verify that the files actually are in these
>> >>>>> locations
>> >>>>> (they are).
>> >>>>>
>> >>>>> I put in to code to call SetGlobalEnv("OPCODE6DIR",
>> >>>>> "/data/data/assets/aremabi-v7a") just before I call
>> >>>>> CsoundObj.startCsound().
>> >>>>>
>> >>>>> I put in code to verify that the pathname is correct (it is).
>> >>>>>
>> >>>>> No dice... any ideas?
>> >>>>>
>> >>>>> Is it that the global env gets wiped out by the
>> >>>>> CsoundAndroid.Compile()
>> >>>>> call?
>> >>>>>
>> >>>>> Is it something to do with Android permissions?
>> >>>>>
>> >>>>> Is it something to do with dependent libraries like stlport or
>> >>>>> something?
>> >>>>>
>> >>>>> How does one debug C code running on the device?
>> >>>>>
>> >>>>> Regards,
>> >>>>> Mike
>> >>>>>
>> >>>>> Michael Gogins
>> >>>>> Irreducible Productions
>> >>>>> http://michaelgogins.tumblr.com
>> >>>>> Michael dot Gogins at gmail dot com
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>> ------------------------------------------------------------------------------
>> >>>> How ServiceNow helps IT people transform IT departments:
>> >>>> 1. A cloud service to automate IT design, transition and operations
>> >>>> 2. Dashboards that offer high-level views of enterprise services
>> >>>> 3. A single system of record for all IT processes
>> >>>> http://p.sf.net/sfu/servicenow-d2d-j
>> >>>> _______________________________________________
>> >>>> Csound-devel mailing list
>> >>>> Csound-devel@lists.sourceforge.net
>> >>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>>>
>> >>>
>> >>>
>> >>>
>> >>> ------------------------------------------------------------------------------
>> >>> How ServiceNow helps IT people transform IT departments:
>> >>> 1. A cloud service to automate IT design, transition and operations
>> >>> 2. Dashboards that offer high-level views of enterprise services
>> >>> 3. A single system of record for all IT processes
>> >>> http://p.sf.net/sfu/servicenow-d2d-j
>> >>> _______________________________________________
>> >>> Csound-devel mailing list
>> >>> Csound-devel@lists.sourceforge.net
>> >>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>> >>
>> >>
>> >>
>> >> ------------------------------------------------------------------------------
>> >> How ServiceNow helps IT people transform IT departments:
>> >> 1. A cloud service to automate IT design, transition and operations
>> >> 2. Dashboards that offer high-level views of enterprise services
>> >> 3. A single system of record for all IT processes
>> >> http://p.sf.net/sfu/servicenow-d2d-j
>> >> _______________________________________________
>> >> Csound-devel mailing list
>> >> Csound-devel@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > How ServiceNow helps IT people transform IT departments:
>> > 1. A cloud service to automate IT design, transition and operations
>> > 2. Dashboards that offer high-level views of enterprise services
>> > 3. A single system of record for all IT processes
>> > http://p.sf.net/sfu/servicenow-d2d-j
>> > _______________________________________________
>> > Csound-devel mailing list
>> > Csound-devel@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>> Dr Victor Lazzarini
>> Senior Lecturer
>> Dept. of Music
>> NUI Maynooth Ireland
>> tel.: +353 1 708 3545
>> Victor dot Lazzarini AT nuim dot ie
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> How ServiceNow helps IT people transform IT departments:
>> 1. A cloud service to automate IT design, transition and operations
>> 2. Dashboards that offer high-level views of enterprise services
>> 3. A single system of record for all IT processes
>> http://p.sf.net/sfu/servicenow-d2d-j
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
> ------------------------------------------------------------------------------
> How ServiceNow helps IT people transform IT departments:
> 1. A cloud service to automate IT design, transition and operations
> 2. Dashboards that offer high-level views of enterprise services
> 3. A single system of record for all IT processes
> http://p.sf.net/sfu/servicenow-d2d-j
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



Date2013-06-07 15:29
FromVictor Lazzarini
SubjectRe: [Cs-dev] Android Csound 6 - loading plugins
AttachmentsNone  None  
We definitely had it working with Csound 5, so dlopen should be OK.

Victor
On 7 Jun 2013, at 15:23, Michael Gogins wrote:

OK, I'll try that.

I've been googling for dlopen on Android. Information is spotty and I think unreliable, but my impression is certainly that dlopen the way Csound does it should work. 

There was one report that dlsym would return an error but also the correct function address, so maybe we should fix up the module loading code to take that into account. I'll put in some debug printouts in that later. And do more googling...


Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Jun 7, 2013 at 10:06 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Maybe you should call csoundSetGlobalEnv(const char *name, const char *value) before creating CsoundObj()?


On 7 Jun 2013, at 14:56, Michael Gogins wrote:

But actually, getEnv is returning the value as set by setGlobalEnv, at least the second time the CsoundObj is created anyway.

Regards,
Mike

Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Jun 7, 2013 at 9:55 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
Oh dear, looks like by renaming things I removed the CsoundAppActivity.java code from Git, I won't be able to put it back till this evening...

Here's the code from the earlier revision:
startStopButton = (ToggleButton) findViewById(R.id.runButton);
startStopButton.setOnClickListener(new OnClickListener() {
public synchronized void onClick(View v) {
if (csd == null) {
startStopButton.toggle();
return;
}
if (startStopButton.isChecked()) {
csound = new CsoundObj();
csound.messagePoster = CsoundAppActivity.this;
csound.setMessageLoggingEnabled(true);
// Make sure this stuff really got packaged.
// We can interrogate the shared libs dir the same way
// to see what architecture is running.
String samples[] = null;
String armeabi[] = null;
String armeabi_v7a[] = null;
try {
samples = getAssets().list("samples");
armeabi = getAssets().list("armeabi/OPCODE6DIR");
armeabi_v7a = getAssets().list("armeabi-v7a/OPCODE6DIR");
} catch (IOException e) {
e.printStackTrace();
}
// We ask for the data directory in case Android changes on us without warning.
PackageInfo packageInfo = null;
try {
packageInfo = getPackageManager().getPackageInfo(getPackageName(), 0);
} catch (NameNotFoundException e) {
e.printStackTrace();
}
String channelName;
for (int i = 0; i < 5; i++) {
channelName = "slider" + (i + 1);
csound.addSlider(sliders.get(i), channelName, 0., 1.);
channelName = "butt" + (i + 1);
csound.addButton(buttons.get(i), channelName, 1);
}
csound.addButton(pad, "trackpad", 1);
csound.enableAccelerometer(CsoundAppActivity.this);
csound.addCompletionListener(CsoundAppActivity.this);
// Set Csound environment variables.
String OPCODE6DIR = packageInfo.applicationInfo.dataDir + "/assets/libs";
String SSDIR = packageInfo.applicationInfo.dataDir + "/assets/samples";
csound.getCsound().SetGlobalEnv("OPCODE6DIR", OPCODE6DIR);
csound.getCsound().SetGlobalEnv("SSDIR", SSDIR);
csound.startCsound(csd);
postMessageClear("Csound is starting...\n");
csound.getCsound().Message("OPCODE6DIR has been set to: " + csound.getCsound().GetEnv("OPCODE6DIR") + "\n");
csound.getCsound().Message("SSDIR has been set to: " + csound.getCsound().GetEnv("SSDIR") + "\n");
} else {
csound.stopCsound();
postMessage("Csound has been stopped.\n");
}
}
});




Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Jun 7, 2013 at 9:31 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
It's floats, so it should be OPCODE6DIR, but you could set both.

I'll look again at the Csound set env code to see if I can spot anything. Could you outline here the sequence of API calls?

On 7 Jun 2013, at 12:41, Michael Gogins wrote:

Thanks for the quick change.

Unfortunately, it's still not working. The value of OPCODE6DIR is now returned as I expect from getEnv after starting Csound, but still no load.

Is this "float" or "double" Csound here? Should it be OPCODE6DIR64 instead of just OPCODE6DIR?

Anyway, the code is cleaned up a bit, made consistent, and checked in, so you should be download and debug. In the debugger you can inspect what getAssets returns and see that the files are indeed where OPCODE6DIR says they should be.

BTW, I renamed CsoundApp.apk to Csound6.apk.

Regards,
Mike





Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Jun 7, 2013 at 2:32 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Try it now with code from GIT. I made some changes that should prevent any resetting to happen when Csound is created.

Victor

On 7 Jun 2013, at 04:19, Michael Gogins wrote:

I changed the location,  but in my tests it is consistent,  and I verify it by printing out the directory listing from the device in the debugger.

I note that if I call set global env then start Csound Then get env, it returns null. That can't be right. ..

On Jun 6, 2013 10:54 PM, "Steven Yi" <stevenyi@gmail.com> wrote:
Hi Michael,

I took a quick look and had some questions:

1. This seems to be setting the libs to a folder different than what
you're looking for with the list() calls:

String OPCODE6DIR = packageInfo.applicationInfo.dataDir + "/assets/libs";

Shouldn't that be "/assets/armeabi-v7a/OPCODE6DIR" ?


2. For your generated APK file, could you to a "tar tzvf
CSDPlayer.apk" to list the contents and post it here?

Thanks!
steven

p.s. - I'm going on a long drive tomorrow and again on Sunday, so I'll
be off and on the internet the next few days.

On Thu, Jun 6, 2013 at 8:14 PM, Michael Gogins <michael.gogins@gmail.com> wrote:
> I think there may be a difference in that Csound 5 has PreCompile and Csound
> 6 does not... Csound is acting like it forgets the global env I have set.
> I've booked in my code for you all to play with.
>
> Regards,
> Mike
>
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Thu, Jun 6, 2013 at 10:03 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie>
> wrote:
>>
>> Plugins do not normally depend on libsndfile (I changed this ages ago). I
>> think it is more likely that the
>> plugin library was not found. One thing to try is to use --opcode-lib= to
>> load it from the CSDPlayer,
>> placing the plugin in the same dir as the CSD (for convenience).
>>
>> On 6 Jun 2013, at 14:53, Steven Yi wrote:
>>
>> > Just FYI, the way libcsoundandroid.so builds (or did, haven't gotten
>> > to building since the build file changes), it linked in libsndfile
>> > statically so that that libcsoundandroid has both libcsound and
>> > libsndfile into one lib.  I think that was done at the time to just
>> > make it easier to have one lib to distribute, but it'd be fine to
>> > change that to split to libs.
>> >
>> > Can't think of anything else that might be a hint.  I'll wait until
>> > the code is checked in and will look at building/testing here.
>> > Hopefully it's something simple. :)
>> >
>> > On Thu, Jun 6, 2013 at 9:43 AM, Michael Gogins
>> > <michael.gogins@gmail.com> wrote:
>> >> Yes, I was trying with fluidsynth.
>> >>
>> >> Michael Gogins
>> >> Irreducible Productions
>> >> http://michaelgogins.tumblr.com
>> >> Michael dot Gogins at gmail dot com
>> >>
>> >>
>> >> On Thu, Jun 6, 2013 at 9:38 AM, Steven Yi <stevenyi@gmail.com> wrote:
>> >>>
>> >>> Well we eliminate some variables.  I know that the fluidsynth opcode
>> >>> libs built and loaded, as did the stdutil library.  I had tested and
>> >>> got these both to load and run.  If you test with just those
>> >>> libraries, that will eliminate some variables and just leave it to
>> >>> getting the correct path.
>> >>>
>> >>> On Thu, Jun 6, 2013 at 9:32 AM, Michael Gogins
>> >>> <michael.gogins@gmail.com>
>> >>> wrote:
>> >>>> There may be local shared libs I need:
>> >>>>
>> >>>>
>> >>>>
>> >>>> http://stackoverflow.com/questions/11444039/why-am-i-not-able-to-use-my-function-that-is-declared-in-so-library
>> >>>>
>> >>>> Regards,
>> >>>> Mike
>> >>>>
>> >>>> Michael Gogins
>> >>>> Irreducible Productions
>> >>>> http://michaelgogins.tumblr.com
>> >>>> Michael dot Gogins at gmail dot com
>> >>>>
>> >>>>
>> >>>> On Thu, Jun 6, 2013 at 9:18 AM, Michael Gogins
>> >>>> <michael.gogins@gmail.com>
>> >>>> wrote:
>> >>>>>
>> >>>>> I put the dynamically loaded shared libraries in
>> >>>>> assets/armeabi/OPCODE6DIR
>> >>>>> and in assets/armeabi-v7a/OPCODE6DIR.
>> >>>>>
>> >>>>> I put in code to verify that the files actually are in these
>> >>>>> locations
>> >>>>> (they are).
>> >>>>>
>> >>>>> I put in to code to call SetGlobalEnv("OPCODE6DIR",
>> >>>>> "/data/data/assets/aremabi-v7a") just before I call
>> >>>>> CsoundObj.startCsound().
>> >>>>>
>> >>>>> I put in code to verify that the pathname is correct (it is).
>> >>>>>
>> >>>>> No dice... any ideas?
>> >>>>>
>> >>>>> Is it that the global env gets wiped out by the
>> >>>>> CsoundAndroid.Compile()
>> >>>>> call?
>> >>>>>
>> >>>>> Is it something to do with Android permissions?
>> >>>>>
>> >>>>> Is it something to do with dependent libraries like stlport or
>> >>>>> something?
>> >>>>>
>> >>>>> How does one debug C code running on the device?
>> >>>>>
>> >>>>> Regards,
>> >>>>> Mike
>> >>>>>
>> >>>>> Michael Gogins
>> >>>>> Irreducible Productions
>> >>>>> http://michaelgogins.tumblr.com
>> >>>>> Michael dot Gogins at gmail dot com
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>> ------------------------------------------------------------------------------
>> >>>> How ServiceNow helps IT people transform IT departments:
>> >>>> 1. A cloud service to automate IT design, transition and operations
>> >>>> 2. Dashboards that offer high-level views of enterprise services
>> >>>> 3. A single system of record for all IT processes
>> >>>> http://p.sf.net/sfu/servicenow-d2d-j
>> >>>> _______________________________________________
>> >>>> Csound-devel mailing list
>> >>>> Csound-devel@lists.sourceforge.net
>> >>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>>>
>> >>>
>> >>>
>> >>>
>> >>> ------------------------------------------------------------------------------
>> >>> How ServiceNow helps IT people transform IT departments:
>> >>> 1. A cloud service to automate IT design, transition and operations
>> >>> 2. Dashboards that offer high-level views of enterprise services
>> >>> 3. A single system of record for all IT processes
>> >>> http://p.sf.net/sfu/servicenow-d2d-j
>> >>> _______________________________________________
>> >>> Csound-devel mailing list
>> >>> Csound-devel@lists.sourceforge.net
>> >>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>> >>
>> >>
>> >>
>> >> ------------------------------------------------------------------------------
>> >> How ServiceNow helps IT people transform IT departments:
>> >> 1. A cloud service to automate IT design, transition and operations
>> >> 2. Dashboards that offer high-level views of enterprise services
>> >> 3. A single system of record for all IT processes
>> >> http://p.sf.net/sfu/servicenow-d2d-j
>> >> _______________________________________________
>> >> Csound-devel mailing list
>> >> Csound-devel@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > How ServiceNow helps IT people transform IT departments:
>> > 1. A cloud service to automate IT design, transition and operations
>> > 2. Dashboards that offer high-level views of enterprise services
>> > 3. A single system of record for all IT processes
>> > http://p.sf.net/sfu/servicenow-d2d-j
>> > _______________________________________________
>> > Csound-devel mailing list
>> > Csound-devel@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>> Dr Victor Lazzarini
>> Senior Lecturer
>> Dept. of Music
>> NUI Maynooth Ireland
>> tel.: +353 1 708 3545
>> Victor dot Lazzarini AT nuim dot ie
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> How ServiceNow helps IT people transform IT departments:
>> 1. A cloud service to automate IT design, transition and operations
>> 2. Dashboards that offer high-level views of enterprise services
>> 3. A single system of record for all IT processes
>> http://p.sf.net/sfu/servicenow-d2d-j
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
> ------------------------------------------------------------------------------
> How ServiceNow helps IT people transform IT departments:
> 1. A cloud service to automate IT design, transition and operations
> 2. Dashboards that offer high-level views of enterprise services
> 3. A single system of record for all IT processes
> http://p.sf.net/sfu/servicenow-d2d-j
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




Date2013-06-07 15:43
FromMichael Gogins
SubjectRe: [Cs-dev] Android Csound 6 - loading plugins
AttachmentsNone  None  
I think you were using a different version of Android (I am using Ice Cream Sandwich 4.2.2). There are multiple reports of an issue with dlsym in Android, here is one: http://grokbase.com/t/gg/android-ndk/12628t0pf1/dlsym-not-working-on-ics. It looks like the problem can be solved without harm to other platforms by clearing any DL errors before each dlsym call, and/or checking if the returned function pointer is actually null.

If you have an older Android, try csound6.apk from SourceForge and try create a fluidEngine in your csd.

Regards,
Mike

Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Jun 7, 2013 at 10:29 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
We definitely had it working with Csound 5, so dlopen should be OK.

Victor

On 7 Jun 2013, at 15:23, Michael Gogins wrote:

OK, I'll try that.

I've been googling for dlopen on Android. Information is spotty and I think unreliable, but my impression is certainly that dlopen the way Csound does it should work. 

There was one report that dlsym would return an error but also the correct function address, so maybe we should fix up the module loading code to take that into account. I'll put in some debug printouts in that later. And do more googling...


Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Jun 7, 2013 at 10:06 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Maybe you should call csoundSetGlobalEnv(const char *name, const char *value) before creating CsoundObj()?


On 7 Jun 2013, at 14:56, Michael Gogins wrote:

But actually, getEnv is returning the value as set by setGlobalEnv, at least the second time the CsoundObj is created anyway.

Regards,
Mike

Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Jun 7, 2013 at 9:55 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
Oh dear, looks like by renaming things I removed the CsoundAppActivity.java code from Git, I won't be able to put it back till this evening...

Here's the code from the earlier revision:
startStopButton = (ToggleButton) findViewById(R.id.runButton);
startStopButton.setOnClickListener(new OnClickListener() {
public synchronized void onClick(View v) {
if (csd == null) {
startStopButton.toggle();
return;
}
if (startStopButton.isChecked()) {
csound = new CsoundObj();
csound.messagePoster = CsoundAppActivity.this;
csound.setMessageLoggingEnabled(true);
// Make sure this stuff really got packaged.
// We can interrogate the shared libs dir the same way
// to see what architecture is running.
String samples[] = null;
String armeabi[] = null;
String armeabi_v7a[] = null;
try {
samples = getAssets().list("samples");
armeabi = getAssets().list("armeabi/OPCODE6DIR");
armeabi_v7a = getAssets().list("armeabi-v7a/OPCODE6DIR");
} catch (IOException e) {
e.printStackTrace();
}
// We ask for the data directory in case Android changes on us without warning.
PackageInfo packageInfo = null;
try {
packageInfo = getPackageManager().getPackageInfo(getPackageName(), 0);
} catch (NameNotFoundException e) {
e.printStackTrace();
}
String channelName;
for (int i = 0; i < 5; i++) {
channelName = "slider" + (i + 1);
csound.addSlider(sliders.get(i), channelName, 0., 1.);
channelName = "butt" + (i + 1);
csound.addButton(buttons.get(i), channelName, 1);
}
csound.addButton(pad, "trackpad", 1);
csound.enableAccelerometer(CsoundAppActivity.this);
csound.addCompletionListener(CsoundAppActivity.this);
// Set Csound environment variables.
String OPCODE6DIR = packageInfo.applicationInfo.dataDir + "/assets/libs";
String SSDIR = packageInfo.applicationInfo.dataDir + "/assets/samples";
csound.getCsound().SetGlobalEnv("OPCODE6DIR", OPCODE6DIR);
csound.getCsound().SetGlobalEnv("SSDIR", SSDIR);
csound.startCsound(csd);
postMessageClear("Csound is starting...\n");
csound.getCsound().Message("OPCODE6DIR has been set to: " + csound.getCsound().GetEnv("OPCODE6DIR") + "\n");
csound.getCsound().Message("SSDIR has been set to: " + csound.getCsound().GetEnv("SSDIR") + "\n");
} else {
csound.stopCsound();
postMessage("Csound has been stopped.\n");
}
}
});




Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Jun 7, 2013 at 9:31 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
It's floats, so it should be OPCODE6DIR, but you could set both.

I'll look again at the Csound set env code to see if I can spot anything. Could you outline here the sequence of API calls?

On 7 Jun 2013, at 12:41, Michael Gogins wrote:

Thanks for the quick change.

Unfortunately, it's still not working. The value of OPCODE6DIR is now returned as I expect from getEnv after starting Csound, but still no load.

Is this "float" or "double" Csound here? Should it be OPCODE6DIR64 instead of just OPCODE6DIR?

Anyway, the code is cleaned up a bit, made consistent, and checked in, so you should be download and debug. In the debugger you can inspect what getAssets returns and see that the files are indeed where OPCODE6DIR says they should be.

BTW, I renamed CsoundApp.apk to Csound6.apk.

Regards,
Mike





Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Fri, Jun 7, 2013 at 2:32 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
Try it now with code from GIT. I made some changes that should prevent any resetting to happen when Csound is created.

Victor

On 7 Jun 2013, at 04:19, Michael Gogins wrote:

I changed the location,  but in my tests it is consistent,  and I verify it by printing out the directory listing from the device in the debugger.

I note that if I call set global env then start Csound Then get env, it returns null. That can't be right. ..

On Jun 6, 2013 10:54 PM, "Steven Yi" <stevenyi@gmail.com> wrote:
Hi Michael,

I took a quick look and had some questions:

1. This seems to be setting the libs to a folder different than what
you're looking for with the list() calls:

String OPCODE6DIR = packageInfo.applicationInfo.dataDir + "/assets/libs";

Shouldn't that be "/assets/armeabi-v7a/OPCODE6DIR" ?


2. For your generated APK file, could you to a "tar tzvf
CSDPlayer.apk" to list the contents and post it here?

Thanks!
steven

p.s. - I'm going on a long drive tomorrow and again on Sunday, so I'll
be off and on the internet the next few days.

On Thu, Jun 6, 2013 at 8:14 PM, Michael Gogins <michael.gogins@gmail.com> wrote:
> I think there may be a difference in that Csound 5 has PreCompile and Csound
> 6 does not... Csound is acting like it forgets the global env I have set.
> I've booked in my code for you all to play with.
>
> Regards,
> Mike
>
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Thu, Jun 6, 2013 at 10:03 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie>
> wrote:
>>
>> Plugins do not normally depend on libsndfile (I changed this ages ago). I
>> think it is more likely that the
>> plugin library was not found. One thing to try is to use --opcode-lib= to
>> load it from the CSDPlayer,
>> placing the plugin in the same dir as the CSD (for convenience).
>>
>> On 6 Jun 2013, at 14:53, Steven Yi wrote:
>>
>> > Just FYI, the way libcsoundandroid.so builds (or did, haven't gotten
>> > to building since the build file changes), it linked in libsndfile
>> > statically so that that libcsoundandroid has both libcsound and
>> > libsndfile into one lib.  I think that was done at the time to just
>> > make it easier to have one lib to distribute, but it'd be fine to
>> > change that to split to libs.
>> >
>> > Can't think of anything else that might be a hint.  I'll wait until
>> > the code is checked in and will look at building/testing here.
>> > Hopefully it's something simple. :)
>> >
>> > On Thu, Jun 6, 2013 at 9:43 AM, Michael Gogins
>> > <michael.gogins@gmail.com> wrote:
>> >> Yes, I was trying with fluidsynth.
>> >>
>> >> Michael Gogins
>> >> Irreducible Productions
>> >> http://michaelgogins.tumblr.com
>> >> Michael dot Gogins at gmail dot com
>> >>
>> >>
>> >> On Thu, Jun 6, 2013 at 9:38 AM, Steven Yi <stevenyi@gmail.com> wrote:
>> >>>
>> >>> Well we eliminate some variables.  I know that the fluidsynth opcode
>> >>> libs built and loaded, as did the stdutil library.  I had tested and
>> >>> got these both to load and run.  If you test with just those
>> >>> libraries, that will eliminate some variables and just leave it to
>> >>> getting the correct path.
>> >>>
>> >>> On Thu, Jun 6, 2013 at 9:32 AM, Michael Gogins
>> >>> <michael.gogins@gmail.com>
>> >>> wrote:
>> >>>> There may be local shared libs I need:
>> >>>>
>> >>>>
>> >>>>
>> >>>> http://stackoverflow.com/questions/11444039/why-am-i-not-able-to-use-my-function-that-is-declared-in-so-library
>> >>>>
>> >>>> Regards,
>> >>>> Mike
>> >>>>
>> >>>> Michael Gogins
>> >>>> Irreducible Productions
>> >>>> http://michaelgogins.tumblr.com
>> >>>> Michael dot Gogins at gmail dot com
>> >>>>
>> >>>>
>> >>>> On Thu, Jun 6, 2013 at 9:18 AM, Michael Gogins
>> >>>> <michael.gogins@gmail.com>
>> >>>> wrote:
>> >>>>>
>> >>>>> I put the dynamically loaded shared libraries in
>> >>>>> assets/armeabi/OPCODE6DIR
>> >>>>> and in assets/armeabi-v7a/OPCODE6DIR.
>> >>>>>
>> >>>>> I put in code to verify that the files actually are in these
>> >>>>> locations
>> >>>>> (they are).
>> >>>>>
>> >>>>> I put in to code to call SetGlobalEnv("OPCODE6DIR",
>> >>>>> "/data/data/assets/aremabi-v7a") just before I call
>> >>>>> CsoundObj.startCsound().
>> >>>>>
>> >>>>> I put in code to verify that the pathname is correct (it is).
>> >>>>>
>> >>>>> No dice... any ideas?
>> >>>>>
>> >>>>> Is it that the global env gets wiped out by the
>> >>>>> CsoundAndroid.Compile()
>> >>>>> call?
>> >>>>>
>> >>>>> Is it something to do with Android permissions?
>> >>>>>
>> >>>>> Is it something to do with dependent libraries like stlport or
>> >>>>> something?
>> >>>>>
>> >>>>> How does one debug C code running on the device?
>> >>>>>
>> >>>>> Regards,
>> >>>>> Mike
>> >>>>>
>> >>>>> Michael Gogins
>> >>>>> Irreducible Productions
>> >>>>> http://michaelgogins.tumblr.com
>> >>>>> Michael dot Gogins at gmail dot com
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>> ------------------------------------------------------------------------------
>> >>>> How ServiceNow helps IT people transform IT departments:
>> >>>> 1. A cloud service to automate IT design, transition and operations
>> >>>> 2. Dashboards that offer high-level views of enterprise services
>> >>>> 3. A single system of record for all IT processes
>> >>>> http://p.sf.net/sfu/servicenow-d2d-j
>> >>>> _______________________________________________
>> >>>> Csound-devel mailing list
>> >>>> Csound-devel@lists.sourceforge.net
>> >>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>>>
>> >>>
>> >>>
>> >>>
>> >>> ------------------------------------------------------------------------------
>> >>> How ServiceNow helps IT people transform IT departments:
>> >>> 1. A cloud service to automate IT design, transition and operations
>> >>> 2. Dashboards that offer high-level views of enterprise services
>> >>> 3. A single system of record for all IT processes
>> >>> http://p.sf.net/sfu/servicenow-d2d-j
>> >>> _______________________________________________
>> >>> Csound-devel mailing list
>> >>> Csound-devel@lists.sourceforge.net
>> >>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>> >>
>> >>
>> >>
>> >> ------------------------------------------------------------------------------
>> >> How ServiceNow helps IT people transform IT departments:
>> >> 1. A cloud service to automate IT design, transition and operations
>> >> 2. Dashboards that offer high-level views of enterprise services
>> >> 3. A single system of record for all IT processes
>> >> http://p.sf.net/sfu/servicenow-d2d-j
>> >> _______________________________________________
>> >> Csound-devel mailing list
>> >> Csound-devel@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >>
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > How ServiceNow helps IT people transform IT departments:
>> > 1. A cloud service to automate IT design, transition and operations
>> > 2. Dashboards that offer high-level views of enterprise services
>> > 3. A single system of record for all IT processes
>> > http://p.sf.net/sfu/servicenow-d2d-j
>> > _______________________________________________
>> > Csound-devel mailing list
>> > Csound-devel@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>> Dr Victor Lazzarini
>> Senior Lecturer
>> Dept. of Music
>> NUI Maynooth Ireland
>> tel.: +353 1 708 3545
>> Victor dot Lazzarini AT nuim dot ie
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> How ServiceNow helps IT people transform IT departments:
>> 1. A cloud service to automate IT design, transition and operations
>> 2. Dashboards that offer high-level views of enterprise services
>> 3. A single system of record for all IT processes
>> http://p.sf.net/sfu/servicenow-d2d-j
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
> ------------------------------------------------------------------------------
> How ServiceNow helps IT people transform IT departments:
> 1. A cloud service to automate IT design, transition and operations
> 2. Dashboards that offer high-level views of enterprise services
> 3. A single system of record for all IT processes
> http://p.sf.net/sfu/servicenow-d2d-j
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel