[Cs-dev] csound 64-bit API
Date | 2008-10-20 13:31 |
From | Jonatan Liljedahl |
Subject | [Cs-dev] csound 64-bit API |
I've got reports that AlgoScore doesn't work with the double version of csound, and I wonder what I should take care of to make it work? Which variables in the API are affected? -- /Jonatan [ http://kymatica.com ] ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2008-10-20 14:02 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] csound 64-bit API |
If you want to build it using the doubles version of the API, you need to set -DUSE_DOUBLE in your compiler options (as well as linking to the correct library). At 13:31 20/10/2008, you wrote: >I've got reports that AlgoScore doesn't work with the double version of >csound, and I wonder what I should take care of to make it work? Which >variables in the API are affected? > >-- >/Jonatan [ http://kymatica.com ] > >------------------------------------------------------------------------- >This SF.Net email is sponsored by the Moblin Your Move Developer's challenge >Build the coolest Linux based applications with Moblin SDK & win great prizes >Grand prize is a trip for two to an Open Source event anywhere in the world >http://moblin-contest.org/redirect.php?banner_id=100&url=/ >_______________________________________________ >Csound-devel mailing list >Csound-devel@lists.sourceforge.net >https://lists.sourceforge.net/lists/listinfo/csound-devel Victor Lazzarini Music Technology Laboratory Music Department National University of Ireland, Maynooth ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2008-10-20 14:11 |
From | Jonatan Liljedahl |
Subject | Re: [Cs-dev] csound 64-bit API |
Victor Lazzarini wrote: > If you want to build it using the doubles version of the API, you need > to set -DUSE_DOUBLE in your compiler options (as well as > linking to the correct library). Yes, I noticed that the new library was named libcsound64 instead of libcsound, that was why my buildscript didn't find csound. But now I got another problem, I use code like this to send score events from AlgoScore to Csound: MYFLT *parms; int i; naRef vec = VECARG(2); int sz = naVec_size(vec); parms = malloc(sizeof(MYFLT)*sz); for(i=0;i |
Date | 2008-10-20 15:05 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] csound 64-bit API |
That is because MYFLT is set to be float not double. You will need -DUSE_DOUBLE to set MYFLT to double. The insert_score_event() is basically getting garbage as the pointer sizes don't match. Victor >But now I got another problem, I use code like this to send score events >from AlgoScore to Csound: > > MYFLT *parms; > int i; > naRef vec = VECARG(2); > int sz = naVec_size(vec); > parms = malloc(sizeof(MYFLT)*sz); > for(i=0;i |
Date | 2008-10-20 15:50 |
From | Jonatan Liljedahl |
Subject | Re: [Cs-dev] csound 64-bit API |
Oh, I didn't realize that I must set USE_DOUBLE also on my own sources. I assumed that MYFLT would be defined as double if csound was compiled with useDouble=1. Why else export MYFLT to the public API? The scons build script could easily write a simple "#define MYFLT double" to myflt.h and let csound.h include it. Then apps using the csound API could just relax and use MYFLT and it would just work. Now I need to check if csound was built with double precision by checking if the library name is "csound" or "csound64" which is kind of ugly. And does this work on MacOSX framework? Is there any other way to check if csound is float or double? Victor Lazzarini wrote: > That is because MYFLT is set to be float not double. You will need > -DUSE_DOUBLE to set MYFLT to double. The insert_score_event() is > basically getting garbage as the pointer sizes don't match. > > Victor > >> But now I got another problem, I use code like this to send score events >>from AlgoScore to Csound: >> MYFLT *parms; >> int i; >> naRef vec = VECARG(2); >> int sz = naVec_size(vec); >> parms = malloc(sizeof(MYFLT)*sz); >> for(i=0;i |
Date | 2008-10-20 18:12 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] csound 64-bit API |
I agree this perhaps needs a better solution. As for the OSX framework, I have not yet decided which way I am going to package the doubles build. Regards Victor At 15:50 20/10/2008, you wrote: >Oh, I didn't realize that I must set USE_DOUBLE also on my own sources. >I assumed that MYFLT would be defined as double if csound was compiled >with useDouble=1. Why else export MYFLT to the public API? > >The scons build script could easily write a simple "#define MYFLT >double" to myflt.h and let csound.h include it. Then apps using the >csound API could just relax and use MYFLT and it would just work. Now I >need to check if csound was built with double precision by checking if >the library name is "csound" or "csound64" which is kind of ugly. And >does this work on MacOSX framework? Is there any other way to check if >csound is float or double? > >Victor Lazzarini wrote: > > That is because MYFLT is set to be float not double. You will need > > -DUSE_DOUBLE to set MYFLT to double. The insert_score_event() is > > basically getting garbage as the pointer sizes don't match. > > > > Victor > > > >> But now I got another problem, I use code like this to send score events > >>from AlgoScore to Csound: > >> MYFLT *parms; > >> int i; > >> naRef vec = VECARG(2); > >> int sz = naVec_size(vec); > >> parms = malloc(sizeof(MYFLT)*sz); > >> for(i=0;i |