<div dir="ltr"><br><br>Hi All,<br><br>Sorry for the cross/multiple posts. I have a C program that uses libecasoundc to control 4
oscillators in ecasound. I took a break from developing this for about
a year. I have recently returned to it and I'm finding that ecasound
stops running very early in the program. A year ago this code was working very well
on a Fedora core 5 machine with Planet ccrma kernel and ecasound <a href="http://3.4.6.1">3.4.6.1</a>. Now I am running Fedora 8
with ccrma but the same code only runs for about 5 seconds before
ecasound stops. I set the ECASOUND_LOGFILE environment variable and found this after about 5 seconds in operation:<br>
<br>
[OBJECTS ] (eca-control) command: q <17850><br>
<br>...after
which there are a bunch of messages that indicate ecasound is stoppng.
I definitely haven't programmed in that command. Why would that show
up?<br>I've compiled the example c program from the ECI guide and found similar behaviour. I have included at the end of this email a small test c program that produces these results on my system.<br><br>Any help is greatly appreciated.<br>
<br>
Thanks a lot,<br>Francis<br><br>Current system info:<br><br>Hardware: Pentium 4, 1.5 G RAM<br>OS: Fedora 8, ccrma<br>#rpm -qa | grep ecasound:<br>ecasound-2.4.6.1-1.fc8.ccrma<br>pyecasound-2.4.6.1-1.fc8.ccrma<br>libecasoundc-2.4.6.1-1.fc8.<div dir="ltr">
ccrma<br><br>TEST C PROGRAM:<br><br>#include <stdio.h><br>#include <unistd.h><br>#include <ecasoundc.h><br>#include <unistd.h> /*sleep */<br><br>//COMPILE: gcc -g -o example example.c `libecasoundc-config --cflags --lib`<br>
<br>int<br>main (int argc, char *argv[])<br>{<br><br>//start jack<br> system ("jackd -R -dalsa -dhw:0 -r44100 -p1024 -n2 2>&1 &");<br> sleep (3);<br>//ecasound stuff<br> eci_init ();<br> eci_command ("cs-add waveup_cs");<br>
<br> //oscillator 1<br> eci_command ("c-add osc1");<br> eci_command ("ai-add null");<br> eci_command ("ao-add jack_generic,osc1");<br> eci_command ("cop-add -el:sine_fcac,0,0");<br>
eci_command ("copp-select 1");<br> eci_command_float_arg ("copp-set", 440);<br> eci_command ("copp-select 2");<br> eci_command_float_arg ("copp-set", 5);<br> eci_command ("cop-add -ea:150");<br>
eci_command ("ctrl-add -kos:1,25,50,1,0");<br> eci_command ("ctrlp-select 4");<br> eci_command_float_arg ("ctrlp-set", 1);<br> <br> eci_command ("cs-connect");<br> eci_command ("start");<br>
usleep (500000);<br><br> //connect jack outputs<br> system ("jack_connect ecasound:osc1_1 alsa_pcm:playback_1");<br> usleep (500000);<br><br> while (1)<br> {<br> int i;<br><br> for (i = 60; i <= 400; i++)<br>
{<br> usleep(1000);<br> eci_command ("c-select osc1");<br> eci_command ("cop-select 1");<br> eci_command ("copp-select 1");<br> eci_command_float_arg ("copp-set", i);<br>
}<br> for (i = 400; i >= 60;i--)<br> {<br> usleep(1000);<br> eci_command ("c-select osc1");<br> eci_command ("cop-select 1");<br> eci_command ("copp-select 1");<br>
eci_command_float_arg ("copp-set", i);<br> }<br><br> eci_command ("engine-status");<br> if (strcmp (eci_last_string (), "running") != 0) {<br> puts ("ECASOUND STOPPED!");<br>
//break;<br> }<br> }<br> <br> eci_command ("stop");<br> eci_command ("cs-disconnect");<br> eci_command ("cop-status");<br> printf ("Chain operator status: %s", eci_last_string ());<br>
eci_cleanup ();<br> <br> return (0);<br>}<br></div></div>