Csound Csound-dev Csound-tekno Search About

[Cs-dev] csoundEvalCode always returns 0

Date2013-11-16 09:43
Fromcitxx
Subject[Cs-dev] csoundEvalCode always returns 0
Hello!

I faced a problem that csoundEvalCode API function always returns zero, not
depending on given code. This is the minimal example:

int main(int argc, char *argv[]) {
  CSOUND *csound = csoundCreate(NULL);
  csoundSetOption(csound, "-odac");
  csoundCompileOrc(csound, "sr = 44100\nksmps = 49\nnchnls = 2\n");
  double four = csoundEvalCode(csound, "return 2 + 2");
  std::cout << "four = " << four << std::endl;
  csoundDestroy(csound);
  return 0;
}

The output is:

0dBFS level = 32768.0
Csound version 6.01.0 (double samples) Nov  2 2013
libsndfile-1.0.25
four = 0
inactive allocs returned to freespace
end of score.		   overall amps:      0.0      0.0
	   overall samples out of range:        0        0
0 errors in performance
Elapsed time at end of performance: real: 0.002s, CPU: 0.000s


Is it a bug in API or am I using it in not correct way?




--
View this message in context: http://csound.1045644.n5.nabble.com/csoundEvalCode-always-returns-0-tp5729748.html
Sent from the Csound - Dev mailing list archive at Nabble.com.

------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-11-16 12:05
FromVictor
SubjectRe: [Cs-dev] csoundEvalCode always returns 0
It could be a bug. I will check.

Victor

On 16 Nov 2013, at 09:43, citxx  wrote:

> Hello!
> 
> I faced a problem that csoundEvalCode API function always returns zero, not
> depending on given code. This is the minimal example:
> 
> int main(int argc, char *argv[]) {
>  CSOUND *csound = csoundCreate(NULL);
>  csoundSetOption(csound, "-odac");
>  csoundCompileOrc(csound, "sr = 44100\nksmps = 49\nnchnls = 2\n");
>  double four = csoundEvalCode(csound, "return 2 + 2");
>  std::cout << "four = " << four << std::endl;
>  csoundDestroy(csound);
>  return 0;
> }
> 
> The output is:
> 
> 0dBFS level = 32768.0
> Csound version 6.01.0 (double samples) Nov  2 2013
> libsndfile-1.0.25
> four = 0
> inactive allocs returned to freespace
> end of score.           overall amps:      0.0      0.0
>       overall samples out of range:        0        0
> 0 errors in performance
> Elapsed time at end of performance: real: 0.002s, CPU: 0.000s
> 
> 
> Is it a bug in API or am I using it in not correct way?
> 
> 
> 
> 
> --
> View this message in context: http://csound.1045644.n5.nabble.com/csoundEvalCode-always-returns-0-tp5729748.html
> Sent from the Csound - Dev mailing list archive at Nabble.com.
> 
> ------------------------------------------------------------------------------
> DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
> OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
> Free app hosting. Or install the open source package on any LAMP server.
> Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
> http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-11-26 15:13
Fromcitxx
SubjectRe: [Cs-dev] csoundEvalCode always returns 0
Is there any progress on topic?


Victor Lazzarini wrote
> It could be a bug. I will check.
> 
> Victor
> 
> On 16 Nov 2013, at 09:43, citxx <

> artemtab@

> > wrote:
> 
>> Hello!
>> 
>> I faced a problem that csoundEvalCode API function always returns zero,
>> not
>> depending on given code. This is the minimal example:
>> 
>> int main(int argc, char *argv[]) {
>>  CSOUND *csound = csoundCreate(NULL);
>>  csoundSetOption(csound, "-odac");
>>  csoundCompileOrc(csound, "sr = 44100\nksmps = 49\nnchnls = 2\n");
>>  double four = csoundEvalCode(csound, "return 2 + 2");
>>  std::cout << "four = " << four << std::endl;
>>  csoundDestroy(csound);
>>  return 0;
>> }
>> 
>> The output is:
>> 
>> 0dBFS level = 32768.0
>> Csound version 6.01.0 (double samples) Nov  2 2013
>> libsndfile-1.0.25
>> four = 0
>> inactive allocs returned to freespace
>> end of score.           overall amps:      0.0      0.0
>>       overall samples out of range:        0        0
>> 0 errors in performance
>> Elapsed time at end of performance: real: 0.002s, CPU: 0.000s
>> 
>> 
>> Is it a bug in API or am I using it in not correct way?
>> 
>> 
>> 
>> 
>> --
>> View this message in context:
>> http://csound.1045644.n5.nabble.com/csoundEvalCode-always-returns-0-tp5729748.html
>> Sent from the Csound - Dev mailing list archive at Nabble.com.
>> 
>> ------------------------------------------------------------------------------
>> DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
>> OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
>> Free app hosting. Or install the open source package on any LAMP server.
>> Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
>> http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> 

> Csound-devel@.sourceforge

>> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 
> ------------------------------------------------------------------------------
> DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
> OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
> Free app hosting. Or install the open source package on any LAMP server.
> Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
> http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list

> Csound-devel@.sourceforge

> https://lists.sourceforge.net/lists/listinfo/csound-devel





--
View this message in context: http://csound.1045644.n5.nabble.com/csoundEvalCode-always-returns-0-tp5729748p5730206.html
Sent from the Csound - Dev mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-11-26 15:36
FromVictor Lazzarini
SubjectRe: [Cs-dev] csoundEvalCode always returns 0
Sorry I got distracted with other things. I just tried your code now and it works perfectly here.
I only modified the printout method so I could do it in C rather than C++.

ligeti-2:debug victor$ ./eval
virtual_keyboard real time MIDI plugin for Csound
0dBFS level = 32768.0
Csound version 6.01.0 (double samples) Nov 25 2013
libsndfile-1.0.25
four = 4.000000 
inactive allocs returned to freespace
end of score.		   overall amps:      0.0      0.0
	   overall samples out of range:        0        0
0 errors in performance
Elapsed time at end of performance: real: 0.003s, CPU: 0.002s
ligeti-2:debug victor$ 

What system are you in? How did you build Csound? Did you add -DUSE_DOUBLE to the build
(if you didn’t, you will get 0 as the result).


On 26 Nov 2013, at 15:13, citxx  wrote:

> Is there any progress on topic?
> 
> 
> Victor Lazzarini wrote
>> It could be a bug. I will check.
>> 
>> Victor
>> 
>> On 16 Nov 2013, at 09:43, citxx <
> 
>> artemtab@
> 
>> > wrote:
>> 
>>> Hello!
>>> 
>>> I faced a problem that csoundEvalCode API function always returns zero,
>>> not
>>> depending on given code. This is the minimal example:
>>> 
>>> int main(int argc, char *argv[]) {
>>> CSOUND *csound = csoundCreate(NULL);
>>> csoundSetOption(csound, "-odac");
>>> csoundCompileOrc(csound, "sr = 44100\nksmps = 49\nnchnls = 2\n");
>>> double four = csoundEvalCode(csound, "return 2 + 2");
>>> std::cout << "four = " << four << std::endl;
>>> csoundDestroy(csound);
>>> return 0;
>>> }
>>> 
>>> The output is:
>>> 
>>> 0dBFS level = 32768.0
>>> Csound version 6.01.0 (double samples) Nov  2 2013
>>> libsndfile-1.0.25
>>> four = 0
>>> inactive allocs returned to freespace
>>> end of score.           overall amps:      0.0      0.0
>>>      overall samples out of range:        0        0
>>> 0 errors in performance
>>> Elapsed time at end of performance: real: 0.002s, CPU: 0.000s
>>> 
>>> 
>>> Is it a bug in API or am I using it in not correct way?
>>> 
>>> 
>>> 
>>> 
>>> --
>>> View this message in context:
>>> http://csound.1045644.n5.nabble.com/csoundEvalCode-always-returns-0-tp5729748.html
>>> Sent from the Csound - Dev mailing list archive at Nabble.com.
>>> 
>>> ------------------------------------------------------------------------------
>>> DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
>>> OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
>>> Free app hosting. Or install the open source package on any LAMP server.
>>> Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
>>> http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> Csound-devel mailing list
>>> 
> 
>> Csound-devel@.sourceforge
> 
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> 
>> ------------------------------------------------------------------------------
>> DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
>> OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
>> Free app hosting. Or install the open source package on any LAMP server.
>> Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
>> http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
> 
>> Csound-devel@.sourceforge
> 
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 
> 
> 
> 
> 
> --
> View this message in context: http://csound.1045644.n5.nabble.com/csoundEvalCode-always-returns-0-tp5729748p5730206.html
> Sent from the Csound - Dev mailing list archive at Nabble.com.
> 
> ------------------------------------------------------------------------------
> Shape the Mobile Experience: Free Subscription
> Software experts and developers: Be at the forefront of tech innovation.
> Intel(R) Software Adrenaline delivers strategic insight and game-changing 
> conversations that shape the rapidly evolving mobile landscape. Sign up now. 
> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-11-26 16:30
Fromjoachim heintz
SubjectRe: [Cs-dev] csoundEvalCode always returns 0
one related question, victor.

i think you have introduced a flag which enables a non-zero return value 
(ticket #63).

which flag is this?

thanks -

	joachim


Am 26.11.2013 16:36, schrieb Victor Lazzarini:
> Sorry I got distracted with other things. I just tried your code now and it works perfectly here.
> I only modified the printout method so I could do it in C rather than C++.
>
> ligeti-2:debug victor$ ./eval
> virtual_keyboard real time MIDI plugin for Csound
> 0dBFS level = 32768.0
> Csound version 6.01.0 (double samples) Nov 25 2013
> libsndfile-1.0.25
> four = 4.000000
> inactive allocs returned to freespace
> end of score.		   overall amps:      0.0      0.0
> 	   overall samples out of range:        0        0
> 0 errors in performance
> Elapsed time at end of performance: real: 0.003s, CPU: 0.002s
> ligeti-2:debug victor$
>
> What system are you in? How did you build Csound? Did you add -DUSE_DOUBLE to the build
> (if you didn’t, you will get 0 as the result).
>
>
> On 26 Nov 2013, at 15:13, citxx  wrote:
>
>> Is there any progress on topic?
>>
>>
>> Victor Lazzarini wrote
>>> It could be a bug. I will check.
>>>
>>> Victor
>>>
>>> On 16 Nov 2013, at 09:43, citxx <
>>
>>> artemtab@
>>
>>> > wrote:
>>>
>>>> Hello!
>>>>
>>>> I faced a problem that csoundEvalCode API function always returns zero,
>>>> not
>>>> depending on given code. This is the minimal example:
>>>>
>>>> int main(int argc, char *argv[]) {
>>>> CSOUND *csound = csoundCreate(NULL);
>>>> csoundSetOption(csound, "-odac");
>>>> csoundCompileOrc(csound, "sr = 44100\nksmps = 49\nnchnls = 2\n");
>>>> double four = csoundEvalCode(csound, "return 2 + 2");
>>>> std::cout << "four = " << four << std::endl;
>>>> csoundDestroy(csound);
>>>> return 0;
>>>> }
>>>>
>>>> The output is:
>>>>
>>>> 0dBFS level = 32768.0
>>>> Csound version 6.01.0 (double samples) Nov  2 2013
>>>> libsndfile-1.0.25
>>>> four = 0
>>>> inactive allocs returned to freespace
>>>> end of score.           overall amps:      0.0      0.0
>>>>       overall samples out of range:        0        0
>>>> 0 errors in performance
>>>> Elapsed time at end of performance: real: 0.002s, CPU: 0.000s
>>>>
>>>>
>>>> Is it a bug in API or am I using it in not correct way?
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://csound.1045644.n5.nabble.com/csoundEvalCode-always-returns-0-tp5729748.html
>>>> Sent from the Csound - Dev mailing list archive at Nabble.com.
>>>>
>>>> ------------------------------------------------------------------------------
>>>> DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
>>>> OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
>>>> Free app hosting. Or install the open source package on any LAMP server.
>>>> Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
>>>> http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>>
>>
>>> Csound-devel@.sourceforge
>>
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>> ------------------------------------------------------------------------------
>>> DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
>>> OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
>>> Free app hosting. Or install the open source package on any LAMP server.
>>> Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
>>> http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> Csound-devel mailing list
>>
>>> Csound-devel@.sourceforge
>>
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>>
>>
>>
>> --
>> View this message in context: http://csound.1045644.n5.nabble.com/csoundEvalCode-always-returns-0-tp5729748p5730206.html
>> Sent from the Csound - Dev mailing list archive at Nabble.com.
>>
>> ------------------------------------------------------------------------------
>> Shape the Mobile Experience: Free Subscription
>> Software experts and developers: Be at the forefront of tech innovation.
>> Intel(R) Software Adrenaline delivers strategic insight and game-changing
>> conversations that shape the rapidly evolving mobile landscape. Sign up now.
>> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge

Date2013-11-26 19:53
Fromcitxx
SubjectRe: [Cs-dev] csoundEvalCode always returns 0
I've just tried to rebuild csound with 'cmake -DUSE_DOUBLE:BOOL=ON' but the
problem is still here.

My system is 64-bit Ubuntu 13.04. I build csound from sources (git
repository, master branch) with the following commands:

$ mkdir build; cd build
$ cmake .. -DUSE_DOUBLE:BOOL=ON
$ make && sudo make install

The example is built with:

$ g++ eval.cpp -o eval -I/usr/local/include -L/usr/local/lib -lcsnd6
-lcsound64


Victor Lazzarini wrote
> Sorry I got distracted with other things. I just tried your code now and
> it works perfectly here.
> I only modified the printout method so I could do it in C rather than C++.
> 
> ligeti-2:debug victor$ ./eval
> virtual_keyboard real time MIDI plugin for Csound
> 0dBFS level = 32768.0
> Csound version 6.01.0 (double samples) Nov 25 2013
> libsndfile-1.0.25
> four = 4.000000 
> inactive allocs returned to freespace
> end of score.		   overall amps:      0.0      0.0
> 	   overall samples out of range:        0        0
> 0 errors in performance
> Elapsed time at end of performance: real: 0.003s, CPU: 0.002s
> ligeti-2:debug victor$ 
> 
> What system are you in? How did you build Csound? Did you add -DUSE_DOUBLE
> to the build
> (if you didn’t, you will get 0 as the result).
> 
> 
> On 26 Nov 2013, at 15:13, citxx <

> artemtab@

> > wrote:
> 
>> Is there any progress on topic?
>> 
>> 
>> Victor Lazzarini wrote
>>> It could be a bug. I will check.
>>> 
>>> Victor
>>> 
>>> On 16 Nov 2013, at 09:43, citxx <
>> 
>>> artemtab@
>> 
>>> > wrote:
>>> 
>>>> Hello!
>>>> 
>>>> I faced a problem that csoundEvalCode API function always returns zero,
>>>> not
>>>> depending on given code. This is the minimal example:
>>>> 
>>>> int main(int argc, char *argv[]) {
>>>> CSOUND *csound = csoundCreate(NULL);
>>>> csoundSetOption(csound, "-odac");
>>>> csoundCompileOrc(csound, "sr = 44100\nksmps = 49\nnchnls = 2\n");
>>>> double four = csoundEvalCode(csound, "return 2 + 2");
>>>> std::cout << "four = " << four << std::endl;
>>>> csoundDestroy(csound);
>>>> return 0;
>>>> }
>>>> 
>>>> The output is:
>>>> 
>>>> 0dBFS level = 32768.0
>>>> Csound version 6.01.0 (double samples) Nov  2 2013
>>>> libsndfile-1.0.25
>>>> four = 0
>>>> inactive allocs returned to freespace
>>>> end of score.           overall amps:      0.0      0.0
>>>>      overall samples out of range:        0        0
>>>> 0 errors in performance
>>>> Elapsed time at end of performance: real: 0.002s, CPU: 0.000s
>>>> 
>>>> 
>>>> Is it a bug in API or am I using it in not correct way?
>>>> 
>>>> 
>>>> 
>>>> 
>>>> --
>>>> View this message in context:
>>>> http://csound.1045644.n5.nabble.com/csoundEvalCode-always-returns-0-tp5729748.html
>>>> Sent from the Csound - Dev mailing list archive at Nabble.com.
>>>> 
>>>> ------------------------------------------------------------------------------
>>>> DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
>>>> OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
>>>> Free app hosting. Or install the open source package on any LAMP
>>>> server.
>>>> Sign up and see examples for AngularJS, jQuery, Sencha Touch and
>>>> Native!
>>>> http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> 
>> 
>>> Csound-devel@.sourceforge
>> 
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>> 
>>> ------------------------------------------------------------------------------
>>> DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
>>> OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
>>> Free app hosting. Or install the open source package on any LAMP server.
>>> Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
>>> http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> Csound-devel mailing list
>> 
>>> Csound-devel@.sourceforge
>> 
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> 
>> 
>> 
>> 
>> 
>> --
>> View this message in context:
>> http://csound.1045644.n5.nabble.com/csoundEvalCode-always-returns-0-tp5729748p5730206.html
>> Sent from the Csound - Dev mailing list archive at Nabble.com.
>> 
>> ------------------------------------------------------------------------------
>> Shape the Mobile Experience: Free Subscription
>> Software experts and developers: Be at the forefront of tech innovation.
>> Intel(R) Software Adrenaline delivers strategic insight and game-changing 
>> conversations that shape the rapidly evolving mobile landscape. Sign up
>> now. 
>> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> 

> Csound-devel@.sourceforge

>> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 
> 
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT 
> organizations don't have a clear picture of how application performance 
> affects their revenue. With AppDynamics, you get 100% visibility into your 
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics
> Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list

> Csound-devel@.sourceforge

> https://lists.sourceforge.net/lists/listinfo/csound-devel





--
View this message in context: http://csound.1045644.n5.nabble.com/csoundEvalCode-always-returns-0-tp5729748p5730232.html
Sent from the Csound - Dev mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-deve

Date2013-11-26 19:59
FromVictor Lazzarini
SubjectRe: [Cs-dev] csoundEvalCode always returns 0
You need to build your program with -DUSE_DOUBLE 

$ g++ eval.cpp -o eval -DUSE_DOUBLE -I/usr/local/include -L/usr/local/lib -lcsnd6 -lcsound64

On 26 Nov 2013, at 19:53, citxx  wrote:

> I've just tried to rebuild csound with 'cmake -DUSE_DOUBLE:BOOL=ON' but the
> problem is still here.
> 
> My system is 64-bit Ubuntu 13.04. I build csound from sources (git
> repository, master branch) with the following commands:
> 
> $ mkdir build; cd build
> $ cmake .. -DUSE_DOUBLE:BOOL=ON
> $ make && sudo make install
> 
> The example is built with:
> 
> $ g++ eval.cpp -o eval -I/usr/local/include -L/usr/local/lib -lcsnd6
> -lcsound64
> 
> 
> Victor Lazzarini wrote
>> Sorry I got distracted with other things. I just tried your code now and
>> it works perfectly here.
>> I only modified the printout method so I could do it in C rather than C++.
>> 
>> ligeti-2:debug victor$ ./eval
>> virtual_keyboard real time MIDI plugin for Csound
>> 0dBFS level = 32768.0
>> Csound version 6.01.0 (double samples) Nov 25 2013
>> libsndfile-1.0.25
>> four = 4.000000 
>> inactive allocs returned to freespace
>> end of score.		   overall amps:      0.0      0.0
>> 	   overall samples out of range:        0        0
>> 0 errors in performance
>> Elapsed time at end of performance: real: 0.003s, CPU: 0.002s
>> ligeti-2:debug victor$ 
>> 
>> What system are you in? How did you build Csound? Did you add -DUSE_DOUBLE
>> to the build
>> (if you didn’t, you will get 0 as the result).
>> 
>> 
>> On 26 Nov 2013, at 15:13, citxx <
> 
>> artemtab@
> 
>> > wrote:
>> 
>>> Is there any progress on topic?
>>> 
>>> 
>>> Victor Lazzarini wrote
>>>> It could be a bug. I will check.
>>>> 
>>>> Victor
>>>> 
>>>> On 16 Nov 2013, at 09:43, citxx <
>>> 
>>>> artemtab@
>>> 
>>>> > wrote:
>>>> 
>>>>> Hello!
>>>>> 
>>>>> I faced a problem that csoundEvalCode API function always returns zero,
>>>>> not
>>>>> depending on given code. This is the minimal example:
>>>>> 
>>>>> int main(int argc, char *argv[]) {
>>>>> CSOUND *csound = csoundCreate(NULL);
>>>>> csoundSetOption(csound, "-odac");
>>>>> csoundCompileOrc(csound, "sr = 44100\nksmps = 49\nnchnls = 2\n");
>>>>> double four = csoundEvalCode(csound, "return 2 + 2");
>>>>> std::cout << "four = " << four << std::endl;
>>>>> csoundDestroy(csound);
>>>>> return 0;
>>>>> }
>>>>> 
>>>>> The output is:
>>>>> 
>>>>> 0dBFS level = 32768.0
>>>>> Csound version 6.01.0 (double samples) Nov  2 2013
>>>>> libsndfile-1.0.25
>>>>> four = 0
>>>>> inactive allocs returned to freespace
>>>>> end of score.           overall amps:      0.0      0.0
>>>>>     overall samples out of range:        0        0
>>>>> 0 errors in performance
>>>>> Elapsed time at end of performance: real: 0.002s, CPU: 0.000s
>>>>> 
>>>>> 
>>>>> Is it a bug in API or am I using it in not correct way?
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> --
>>>>> View this message in context:
>>>>> http://csound.1045644.n5.nabble.com/csoundEvalCode-always-returns-0-tp5729748.html
>>>>> Sent from the Csound - Dev mailing list archive at Nabble.com.
>>>>> 
>>>>> ------------------------------------------------------------------------------
>>>>> DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
>>>>> OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
>>>>> Free app hosting. Or install the open source package on any LAMP
>>>>> server.
>>>>> Sign up and see examples for AngularJS, jQuery, Sencha Touch and
>>>>> Native!
>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
>>>>> _______________________________________________
>>>>> Csound-devel mailing list
>>>>> 
>>> 
>>>> Csound-devel@.sourceforge
>>> 
>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>> 
>>>> ------------------------------------------------------------------------------
>>>> DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
>>>> OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
>>>> Free app hosting. Or install the open source package on any LAMP server.
>>>> Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
>>>> http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>> 
>>>> Csound-devel@.sourceforge
>>> 
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>> 
>>> 
>>> 
>>> 
>>> 
>>> --
>>> View this message in context:
>>> http://csound.1045644.n5.nabble.com/csoundEvalCode-always-returns-0-tp5729748p5730206.html
>>> Sent from the Csound - Dev mailing list archive at Nabble.com.
>>> 
>>> ------------------------------------------------------------------------------
>>> Shape the Mobile Experience: Free Subscription
>>> Software experts and developers: Be at the forefront of tech innovation.
>>> Intel(R) Software Adrenaline delivers strategic insight and game-changing 
>>> conversations that shape the rapidly evolving mobile landscape. Sign up
>>> now. 
>>> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> Csound-devel mailing list
>>> 
> 
>> Csound-devel@.sourceforge
> 
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> 
>> 
>> ------------------------------------------------------------------------------
>> Rapidly troubleshoot problems before they affect your business. Most IT 
>> organizations don't have a clear picture of how application performance 
>> affects their revenue. With AppDynamics, you get 100% visibility into your 
>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics
>> Pro!
>> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
> 
>> Csound-devel@.sourceforge
> 
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 
> 
> 
> 
> 
> --
> View this message in context: http://csound.1045644.n5.nabble.com/csoundEvalCode-always-returns-0-tp5729748p5730232.html
> Sent from the Csound - Dev mailing list archive at Nabble.com.
> 
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT 
> organizations don't have a clear picture of how application performance 
> affects their revenue. With AppDynamics, you get 100% visibility into your 
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-11-26 20:19
Fromcitxx
SubjectRe: [Cs-dev] csoundEvalCode always returns 0
It works. Thank you.

Best regards,
Artem Tabolin.


Victor Lazzarini wrote
> You need to build your program with -DUSE_DOUBLE 
> 
> $ g++ eval.cpp -o eval -DUSE_DOUBLE -I/usr/local/include -L/usr/local/lib
> -lcsnd6 -lcsound64
> 
> On 26 Nov 2013, at 19:53, citxx <

> artemtab@

> > wrote:
> 
>> I've just tried to rebuild csound with 'cmake -DUSE_DOUBLE:BOOL=ON' but
>> the
>> problem is still here.
>> 
>> My system is 64-bit Ubuntu 13.04. I build csound from sources (git
>> repository, master branch) with the following commands:
>> 
>> $ mkdir build; cd build
>> $ cmake .. -DUSE_DOUBLE:BOOL=ON
>> $ make && sudo make install
>> 
>> The example is built with:
>> 
>> $ g++ eval.cpp -o eval -I/usr/local/include -L/usr/local/lib -lcsnd6
>> -lcsound64
>> 
>> 
>> Victor Lazzarini wrote
>>> Sorry I got distracted with other things. I just tried your code now and
>>> it works perfectly here.
>>> I only modified the printout method so I could do it in C rather than
>>> C++.
>>> 
>>> ligeti-2:debug victor$ ./eval
>>> virtual_keyboard real time MIDI plugin for Csound
>>> 0dBFS level = 32768.0
>>> Csound version 6.01.0 (double samples) Nov 25 2013
>>> libsndfile-1.0.25
>>> four = 4.000000 
>>> inactive allocs returned to freespace
>>> end of score.		   overall amps:      0.0      0.0
>>> 	   overall samples out of range:        0        0
>>> 0 errors in performance
>>> Elapsed time at end of performance: real: 0.003s, CPU: 0.002s
>>> ligeti-2:debug victor$ 
>>> 
>>> What system are you in? How did you build Csound? Did you add
>>> -DUSE_DOUBLE
>>> to the build
>>> (if you didn’t, you will get 0 as the result).
>>> 
>>> 
>>> On 26 Nov 2013, at 15:13, citxx <
>> 
>>> artemtab@
>> 
>>> > wrote:
>>> 
>>>> Is there any progress on topic?
>>>> 
>>>> 
>>>> Victor Lazzarini wrote
>>>>> It could be a bug. I will check.
>>>>> 
>>>>> Victor
>>>>> 
>>>>> On 16 Nov 2013, at 09:43, citxx <
>>>> 
>>>>> artemtab@
>>>> 
>>>>> > wrote:
>>>>> 
>>>>>> Hello!
>>>>>> 
>>>>>> I faced a problem that csoundEvalCode API function always returns
>>>>>> zero,
>>>>>> not
>>>>>> depending on given code. This is the minimal example:
>>>>>> 
>>>>>> int main(int argc, char *argv[]) {
>>>>>> CSOUND *csound = csoundCreate(NULL);
>>>>>> csoundSetOption(csound, "-odac");
>>>>>> csoundCompileOrc(csound, "sr = 44100\nksmps = 49\nnchnls = 2\n");
>>>>>> double four = csoundEvalCode(csound, "return 2 + 2");
>>>>>> std::cout << "four = " << four << std::endl;
>>>>>> csoundDestroy(csound);
>>>>>> return 0;
>>>>>> }
>>>>>> 
>>>>>> The output is:
>>>>>> 
>>>>>> 0dBFS level = 32768.0
>>>>>> Csound version 6.01.0 (double samples) Nov  2 2013
>>>>>> libsndfile-1.0.25
>>>>>> four = 0
>>>>>> inactive allocs returned to freespace
>>>>>> end of score.           overall amps:      0.0      0.0
>>>>>>     overall samples out of range:        0        0
>>>>>> 0 errors in performance
>>>>>> Elapsed time at end of performance: real: 0.002s, CPU: 0.000s
>>>>>> 
>>>>>> 
>>>>>> Is it a bug in API or am I using it in not correct way?
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> --
>>>>>> View this message in context:
>>>>>> http://csound.1045644.n5.nabble.com/csoundEvalCode-always-returns-0-tp5729748.html
>>>>>> Sent from the Csound - Dev mailing list archive at Nabble.com.
>>>>>> 
>>>>>> ------------------------------------------------------------------------------
>>>>>> DreamFactory - Open Source REST & JSON Services for HTML5 & Native
>>>>>> Apps
>>>>>> OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
>>>>>> Free app hosting. Or install the open source package on any LAMP
>>>>>> server.
>>>>>> Sign up and see examples for AngularJS, jQuery, Sencha Touch and
>>>>>> Native!
>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
>>>>>> _______________________________________________
>>>>>> Csound-devel mailing list
>>>>>> 
>>>> 
>>>>> Csound-devel@.sourceforge
>>>> 
>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>> 
>>>>> ------------------------------------------------------------------------------
>>>>> DreamFactory - Open Source REST & JSON Services for HTML5 & Native
>>>>> Apps
>>>>> OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
>>>>> Free app hosting. Or install the open source package on any LAMP
>>>>> server.
>>>>> Sign up and see examples for AngularJS, jQuery, Sencha Touch and
>>>>> Native!
>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
>>>>> _______________________________________________
>>>>> Csound-devel mailing list
>>>> 
>>>>> Csound-devel@.sourceforge
>>>> 
>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> --
>>>> View this message in context:
>>>> http://csound.1045644.n5.nabble.com/csoundEvalCode-always-returns-0-tp5729748p5730206.html
>>>> Sent from the Csound - Dev mailing list archive at Nabble.com.
>>>> 
>>>> ------------------------------------------------------------------------------
>>>> Shape the Mobile Experience: Free Subscription
>>>> Software experts and developers: Be at the forefront of tech
>>>> innovation.
>>>> Intel(R) Software Adrenaline delivers strategic insight and
>>>> game-changing 
>>>> conversations that shape the rapidly evolving mobile landscape. Sign up
>>>> now. 
>>>> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> 
>> 
>>> Csound-devel@.sourceforge
>> 
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>> 
>>> 
>>> ------------------------------------------------------------------------------
>>> Rapidly troubleshoot problems before they affect your business. Most IT 
>>> organizations don't have a clear picture of how application performance 
>>> affects their revenue. With AppDynamics, you get 100% visibility into
>>> your 
>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of
>>> AppDynamics
>>> Pro!
>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> Csound-devel mailing list
>> 
>>> Csound-devel@.sourceforge
>> 
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> 
>> 
>> 
>> 
>> 
>> --
>> View this message in context:
>> http://csound.1045644.n5.nabble.com/csoundEvalCode-always-returns-0-tp5729748p5730232.html
>> Sent from the Csound - Dev mailing list archive at Nabble.com.
>> 
>> ------------------------------------------------------------------------------
>> Rapidly troubleshoot problems before they affect your business. Most IT 
>> organizations don't have a clear picture of how application performance 
>> affects their revenue. With AppDynamics, you get 100% visibility into
>> your 
>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics
>> Pro!
>> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> 

> Csound-devel@.sourceforge

>> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 
> 
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT 
> organizations don't have a clear picture of how application performance 
> affects their revenue. With AppDynamics, you get 100% visibility into your 
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics
> Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list

> Csound-devel@.sourceforge

> https://lists.sourceforge.net/lists/listinfo/csound-devel





--
View this message in context: http://csound.1045644.n5.nabble.com/csoundEvalCode-always-returns-0-tp5729748p5730235.html
Sent from the Csound - Dev mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinf

Date2013-11-26 20:55
FromVictor Lazzarini
SubjectRe: [Cs-dev] csoundEvalCode always returns 0
It’s —daemon.
On 26 Nov 2013, at 16:30, joachim heintz  wrote:

> one related question, victor.
> 
> i think you have introduced a flag which enables a non-zero return value 
> (ticket #63).
> 
> which flag is this?
> 
> thanks -
> 
> 	joachim
> 
> 
> Am 26.11.2013 16:36, schrieb Victor Lazzarini:
>> Sorry I got distracted with other things. I just tried your code now and it works perfectly here.
>> I only modified the printout method so I could do it in C rather than C++.
>> 
>> ligeti-2:debug victor$ ./eval
>> virtual_keyboard real time MIDI plugin for Csound
>> 0dBFS level = 32768.0
>> Csound version 6.01.0 (double samples) Nov 25 2013
>> libsndfile-1.0.25
>> four = 4.000000
>> inactive allocs returned to freespace
>> end of score.		   overall amps:      0.0      0.0
>> 	   overall samples out of range:        0        0
>> 0 errors in performance
>> Elapsed time at end of performance: real: 0.003s, CPU: 0.002s
>> ligeti-2:debug victor$
>> 
>> What system are you in? How did you build Csound? Did you add -DUSE_DOUBLE to the build
>> (if you didn’t, you will get 0 as the result).
>> 
>> 
>> On 26 Nov 2013, at 15:13, citxx  wrote:
>> 
>>> Is there any progress on topic?
>>> 
>>> 
>>> Victor Lazzarini wrote
>>>> It could be a bug. I will check.
>>>> 
>>>> Victor
>>>> 
>>>> On 16 Nov 2013, at 09:43, citxx <
>>> 
>>>> artemtab@
>>> 
>>>> > wrote:
>>>> 
>>>>> Hello!
>>>>> 
>>>>> I faced a problem that csoundEvalCode API function always returns zero,
>>>>> not
>>>>> depending on given code. This is the minimal example:
>>>>> 
>>>>> int main(int argc, char *argv[]) {
>>>>> CSOUND *csound = csoundCreate(NULL);
>>>>> csoundSetOption(csound, "-odac");
>>>>> csoundCompileOrc(csound, "sr = 44100\nksmps = 49\nnchnls = 2\n");
>>>>> double four = csoundEvalCode(csound, "return 2 + 2");
>>>>> std::cout << "four = " << four << std::endl;
>>>>> csoundDestroy(csound);
>>>>> return 0;
>>>>> }
>>>>> 
>>>>> The output is:
>>>>> 
>>>>> 0dBFS level = 32768.0
>>>>> Csound version 6.01.0 (double samples) Nov  2 2013
>>>>> libsndfile-1.0.25
>>>>> four = 0
>>>>> inactive allocs returned to freespace
>>>>> end of score.           overall amps:      0.0      0.0
>>>>>      overall samples out of range:        0        0
>>>>> 0 errors in performance
>>>>> Elapsed time at end of performance: real: 0.002s, CPU: 0.000s
>>>>> 
>>>>> 
>>>>> Is it a bug in API or am I using it in not correct way?
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> --
>>>>> View this message in context:
>>>>> http://csound.1045644.n5.nabble.com/csoundEvalCode-always-returns-0-tp5729748.html
>>>>> Sent from the Csound - Dev mailing list archive at Nabble.com.
>>>>> 
>>>>> ------------------------------------------------------------------------------
>>>>> DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
>>>>> OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
>>>>> Free app hosting. Or install the open source package on any LAMP server.
>>>>> Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
>>>>> _______________________________________________
>>>>> Csound-devel mailing list
>>>>> 
>>> 
>>>> Csound-devel@.sourceforge
>>> 
>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>> 
>>>> ------------------------------------------------------------------------------
>>>> DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
>>>> OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
>>>> Free app hosting. Or install the open source package on any LAMP server.
>>>> Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
>>>> http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>> 
>>>> Csound-devel@.sourceforge
>>> 
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>> 
>>> 
>>> 
>>> 
>>> 
>>> --
>>> View this message in context: http://csound.1045644.n5.nabble.com/csoundEvalCode-always-returns-0-tp5729748p5730206.html
>>> Sent from the Csound - Dev mailing list archive at Nabble.com.
>>> 
>>> ------------------------------------------------------------------------------
>>> Shape the Mobile Experience: Free Subscription
>>> Software experts and developers: Be at the forefront of tech innovation.
>>> Intel(R) Software Adrenaline delivers strategic insight and game-changing
>>> conversations that shape the rapidly evolving mobile landscape. Sign up now.
>>> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> 
>> 
>> ------------------------------------------------------------------------------
>> Rapidly troubleshoot problems before they affect your business. Most IT
>> organizations don't have a clear picture of how application performance
>> affects their revenue. With AppDynamics, you get 100% visibility into your
>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> 
> 
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT 
> organizations don't have a clear picture of how application performance 
> affects their revenue. With AppDynamics, you get 100% visibility into your 
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-11-29 15:24
Fromjoachim heintz
SubjectRe: [Cs-dev] csoundEvalCode always returns 0
thanks. i see now that --daemon enables more tolerance, but that the 
return values in csound6 are again the same as in csound5. good 
solution, i think.
best -
	joachim



Am 26.11.2013 21:55, schrieb Victor Lazzarini:
> It’s —daemon.
> On 26 Nov 2013, at 16:30, joachim heintz  wrote:
>
>> one related question, victor.
>>
>> i think you have introduced a flag which enables a non-zero return value
>> (ticket #63).
>>
>> which flag is this?
>>
>> thanks -
>>
>> 	joachim
>>
>>
>> Am 26.11.2013 16:36, schrieb Victor Lazzarini:
>>> Sorry I got distracted with other things. I just tried your code now and it works perfectly here.
>>> I only modified the printout method so I could do it in C rather than C++.
>>>
>>> ligeti-2:debug victor$ ./eval
>>> virtual_keyboard real time MIDI plugin for Csound
>>> 0dBFS level = 32768.0
>>> Csound version 6.01.0 (double samples) Nov 25 2013
>>> libsndfile-1.0.25
>>> four = 4.000000
>>> inactive allocs returned to freespace
>>> end of score.		   overall amps:      0.0      0.0
>>> 	   overall samples out of range:        0        0
>>> 0 errors in performance
>>> Elapsed time at end of performance: real: 0.003s, CPU: 0.002s
>>> ligeti-2:debug victor$
>>>
>>> What system are you in? How did you build Csound? Did you add -DUSE_DOUBLE to the build
>>> (if you didn’t, you will get 0 as the result).
>>>
>>>
>>> On 26 Nov 2013, at 15:13, citxx  wrote:
>>>
>>>> Is there any progress on topic?
>>>>
>>>>
>>>> Victor Lazzarini wrote
>>>>> It could be a bug. I will check.
>>>>>
>>>>> Victor
>>>>>
>>>>> On 16 Nov 2013, at 09:43, citxx <
>>>>
>>>>> artemtab@
>>>>
>>>>> > wrote:
>>>>>
>>>>>> Hello!
>>>>>>
>>>>>> I faced a problem that csoundEvalCode API function always returns zero,
>>>>>> not
>>>>>> depending on given code. This is the minimal example:
>>>>>>
>>>>>> int main(int argc, char *argv[]) {
>>>>>> CSOUND *csound = csoundCreate(NULL);
>>>>>> csoundSetOption(csound, "-odac");
>>>>>> csoundCompileOrc(csound, "sr = 44100\nksmps = 49\nnchnls = 2\n");
>>>>>> double four = csoundEvalCode(csound, "return 2 + 2");
>>>>>> std::cout << "four = " << four << std::endl;
>>>>>> csoundDestroy(csound);
>>>>>> return 0;
>>>>>> }
>>>>>>
>>>>>> The output is:
>>>>>>
>>>>>> 0dBFS level = 32768.0
>>>>>> Csound version 6.01.0 (double samples) Nov  2 2013
>>>>>> libsndfile-1.0.25
>>>>>> four = 0
>>>>>> inactive allocs returned to freespace
>>>>>> end of score.           overall amps:      0.0      0.0
>>>>>>       overall samples out of range:        0        0
>>>>>> 0 errors in performance
>>>>>> Elapsed time at end of performance: real: 0.002s, CPU: 0.000s
>>>>>>
>>>>>>
>>>>>> Is it a bug in API or am I using it in not correct way?
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> View this message in context:
>>>>>> http://csound.1045644.n5.nabble.com/csoundEvalCode-always-returns-0-tp5729748.html
>>>>>> Sent from the Csound - Dev mailing list archive at Nabble.com.
>>>>>>
>>>>>> ------------------------------------------------------------------------------
>>>>>> DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
>>>>>> OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
>>>>>> Free app hosting. Or install the open source package on any LAMP server.
>>>>>> Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
>>>>>> _______________________________________________
>>>>>> Csound-devel mailing list
>>>>>>
>>>>
>>>>> Csound-devel@.sourceforge
>>>>
>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
>>>>> OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
>>>>> Free app hosting. Or install the open source package on any LAMP server.
>>>>> Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
>>>>> _______________________________________________
>>>>> Csound-devel mailing list
>>>>
>>>>> Csound-devel@.sourceforge
>>>>
>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context: http://csound.1045644.n5.nabble.com/csoundEvalCode-always-returns-0-tp5729748p5730206.html
>>>> Sent from the Csound - Dev mailing list archive at Nabble.com.
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Shape the Mobile Experience: Free Subscription
>>>> Software experts and developers: Be at the forefront of tech innovation.
>>>> Intel(R) Software Adrenaline delivers strategic insight and game-changing
>>>> conversations that shape the rapidly evolving mobile landscape. Sign up now.
>>>> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>> organizations don't have a clear picture of how application performance
>>> affects their revenue. With AppDynamics, you get 100% visibility into your
>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>
>> ------------------------------------------------------------------------------
>> Rapidly troubleshoot problems before they affect your business. Most IT
>> organizations don't have a clear picture of how application performance
>> affects their revenue. With AppDynamics, you get 100% visibility into your
>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
>> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-