Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] ASIOMME.dll?

Date2006-01-28 01:09
FromMichael Gogins
SubjectRe: [Cs-dev] ASIOMME.dll?
My code (see CsoundVST.cpp and CsoundVstFltk.cpp) is similar. However, I do not destroy Csound after creating it. I keep re-using the same instance. This seems to work fine.

Regards,
Mike

-----Original Message-----
>From: Rory Walsh 
>Sent: Jan 27, 2006 10:25 AM
>To: csound-devel@lists.sourceforge.net
>Subject: [Cs-dev] ASIOMME.dll?
>
>Hi everyone, sorry to bother you when I know you're all busy working on 
>the upcoming release but I have a question regarding the CsoundAPI. I am 
>working on a simple application, everything is working fine except that 
>after I make a call to csoundDestroy and then try the thread again I get 
>a message saying ASIOMME.dll still running. My processing thread is 
>attached below. Is calling csoundDestroy() enough to kill an instance of 
>csound and free anything that it was using? Thanks,
>Rory.
>
>(csoudnthread....)
>{
>     csound = csoundCreate(0);
>     char **cmdl;
>     cmdl = (char **) malloc(sizeof(char*)*(2));
>     cmdl[0] = "csound";
>     cmdl[1] = "e:\\csound\\basic.csd";
>
>     int result = csoundCompile(csound, 2, cmdl);
>
>     if(!result)
>       {
> 
>if((csoundPerformKsmps(csound)!=0)&&(csoundPerformKsmps(csound)!=1))ShowMessage("Error");
>else{
>
>while((csoundPerformKsmps(csound) == 0)&&(Form1->PERFCSOUND))
>             {
>
>             }
>             csoundCleanup(csound);
>             csoundReset(csound);
>           }
>     /*  Destroy Csound. */
>     csoundDestroy(csound);
>     Form1->CSOUND_ON = false;
>     Form1->PLAY = false;
>     }
>}
>
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
>for problems?  Stop!  Download the new AJAX search engine that makes
>searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
>_______________________________________________
>Csound-devel mailing list
>Csound-devel@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/csound-devel





-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2006-01-28 18:39
FromRory Walsh
SubjectRe: [Cs-dev] ASIOMME.dll?
Hi everyone. Thanks for your suggestions however I remain unsuccessful 
in preventing the error. If you don't mind I'd like to fire a few 
questions out there. Firstly can I call csoundCompile as many times as I 
like passing the same instance of csound, or do I need to create a new 
instance each time? They reason I was creating a new thread each time 
the user ran the program was that i wanted to allow them to change the 
file being loaded each time, but from some of your comments I guess one 
thread will do fine. At the moment, every time I click RunCsound in my 
app I create a specific Csound thread. In the thread I call csoundCreate();
csoundPerformKsmps();
csoundCleanup();
csoundReset();
csoundDestroy();
Am I right in saying that this will first create an instance of Csound, 
then it will perform run csound, then it will cleanup and reset the 
audio devices and other callback routines. In my case once that thread 
has finished execution it should free itself, and seen as I have 
destroyed the instance of Csound I should then be able to call my 
RunCsound in my app again without any problems, or so I thought. It's 
here that the error pops up. The first timer it pops up I can click ok 
and then I hear the audio, but the second time after I click ok the 
audio stops. From what I can make of it, it's possible that my thread is 
not freeing itself for some reason? Or csound is not being destroyed for 
some reason, perhaps because PortAudio is not closing. The one thing 
that does work is Victor's advice to add a -+rtaudio=MME flag to the 
command line. I was pretty sure that this was just a simple mistake in 
my implementation of things but after reading your posts I'm now sure it 
is. Can anyone think of any likely things I may be doing wrong? Thanks 
again for all the help and suggestions. Oh yeah one last thing. When I 
close out of my application there are often times when the program still 
appears when I check the task manager. Again, this must surely be 
because of the way I implemented my csound thread. Cheers,

Rory.



Michael Gogins wrote:
> My code (see CsoundVST.cpp and CsoundVstFltk.cpp) is similar. However, I do not destroy Csound after creating it. I keep re-using the same instance. This seems to work fine.
> 
> Regards,
> Mike
> 
> -----Original Message-----
> 
>>From: Rory Walsh 
>>Sent: Jan 27, 2006 10:25 AM
>>To: csound-devel@lists.sourceforge.net
>>Subject: [Cs-dev] ASIOMME.dll?
>>
>>Hi everyone, sorry to bother you when I know you're all busy working on 
>>the upcoming release but I have a question regarding the CsoundAPI. I am 
>>working on a simple application, everything is working fine except that 
>>after I make a call to csoundDestroy and then try the thread again I get 
>>a message saying ASIOMME.dll still running. My processing thread is 
>>attached below. Is calling csoundDestroy() enough to kill an instance of 
>>csound and free anything that it was using? Thanks,
>>Rory.
>>



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net