Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] Android Csound 6.04 String chnexport gives garbage

Date2014-12-02 15:01
FromSteven Yi
SubjectRe: [Cs-dev] Android Csound 6.04 String chnexport gives garbage
AttachmentsNone  None  
Hi Simon,

I'm pretty sure the answer no, no one has been using this. It looks to me that the API for this needs some attention for the wrapped language interfaces.  interfaces/cs_glue.cpp has this:

const char * CsoundMYFLTArray::GetStringValue()
{
    return (char*) p;
}

The SetStringValue is also setting as if the value is a char*.  These should be using STRINGDAT if I'm not mistaken.  

Could you file an issue on Github for this?  Once 6.04.0 is finished, we can look at getting a 6.04.1 out.  In the meanwhile, when I have a chance to investigate this further, I can send you interim builds to test.

Thanks,
steven


On Tue Dec 02 2014 at 6:40:58 AM SimonKenny <digithree@gmail.com> wrote:
Hi all

I'm using Csound in an Android app I've been developing. I use software
buses to tell the host app information about the the CSD, such as the tempo
and name of the CSD. However, after updating to use Csound v6.04 I'm now
only getting garbage in from string channels. The numeric channels work fine
still, and I'm not using any audio channels.

I'm using chnexport as follows in the CSD:

gSname = "Shoe-gaze Harp"
gSname chnexport "name", 2

In my host app, I use, for example (in Java):

io_name = csound.getInputChannelPtr( "name",
controlChannelType.CSOUND_STRING_CHANNEL );
String name = io_name.GetStringValue();

Does anyone use the Android Csound API with strings? Any ideas? Also I
should note that I found the string software bus channels to sometimes give
me garbage in v6.03 also but irregularly. Now it is constant.


Thanks for your time



--
View this message in context: http://csound.1045644.n5.nabble.com/Android-Csound-6-04-String-chnexport-gives-garbage-tp5738943.html
Sent from the Csound - Dev mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Date2014-12-02 15:11
FromVictor Lazzarini
SubjectRe: [Cs-dev] Android Csound 6.04 String chnexport gives garbage
Have you tried using Csound::GetStringChannel()?

========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 2 Dec 2014, at 15:01, Steven Yi  wrote:
> 
> Hi Simon,
> 
> I'm pretty sure the answer no, no one has been using this. It looks to me that the API for this needs some attention for the wrapped language interfaces.  interfaces/cs_glue.cpp has this:
> 
> const char * CsoundMYFLTArray::GetStringValue()
> {
>     return (char*) p;
> }
> 
> The SetStringValue is also setting as if the value is a char*.  These should be using STRINGDAT if I'm not mistaken.  
> 
> Could you file an issue on Github for this?  Once 6.04.0 is finished, we can look at getting a 6.04.1 out.  In the meanwhile, when I have a chance to investigate this further, I can send you interim builds to test.
> 
> Thanks,
> steven
> 
> 
> On Tue Dec 02 2014 at 6:40:58 AM SimonKenny  wrote:
> Hi all
> 
> I'm using Csound in an Android app I've been developing. I use software
> buses to tell the host app information about the the CSD, such as the tempo
> and name of the CSD. However, after updating to use Csound v6.04 I'm now
> only getting garbage in from string channels. The numeric channels work fine
> still, and I'm not using any audio channels.
> 
> I'm using chnexport as follows in the CSD:
> 
> gSname = "Shoe-gaze Harp"
> gSname chnexport "name", 2
> 
> In my host app, I use, for example (in Java):
> 
> io_name = csound.getInputChannelPtr( "name",
> controlChannelType.CSOUND_STRING_CHANNEL );
> String name = io_name.GetStringValue();
> 
> Does anyone use the Android Csound API with strings? Any ideas? Also I
> should note that I found the string software bus channels to sometimes give
> me garbage in v6.03 also but irregularly. Now it is constant.
> 
> 
> Thanks for your time
> 
> 
> 
> --
> View this message in context: http://csound.1045644.n5.nabble.com/Android-Csound-6-04-String-chnexport-gives-garbage-tp5738943.html
> Sent from the Csound - Dev mailing list archive at Nabble.com.
> 
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk_______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net