Re: [Cs-dev] Callback functions...
Date | 2006-01-19 20:09 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] Callback functions... |
Does the Csound instance creation happen in a separate thread? Then it might a problem of thread synchronisation. Either csound is not yet completely created or you are trying to access the CSOUND dataspace at the same time from two threads and they are interfering. You can try using locks to synchronise access, if that's the problem. Victor > > > 1. is csoundthread::csound created properly? > Yes, at least everything else runs fine when I comment out > my ..setCsoundCallback() > > > 2. is it a public member of the class? > Yes. > > > 3. Does the violation happen at the call to > ..setCallback()? Or >is it when the callback is first > invoked by csound? > > Mmm, I just tried to find this out and I noticed that if I > put a Sleep(100) just before I call > CsoundSetMessageCallback() it runs fine, messages and > everything. Any ideas? I don't mind a slight pause before > execution. > > 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 > 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 |
Date | 2006-01-19 20:14 |
From | Rory Walsh |
Subject | Re: [Cs-dev] Callback functions... |
> Does the Csound instance creation happen in a separate thread? Yes. I think as you said it's a case of Csound not being fully created when I call my message function. I will try to clean it up. Having a slight pause is not too much of a problem anyhow, but it will make things a little more elegant if I tidy them up now. Cheers, Rory. Then it might > a problem of thread synchronisation. Either csound > is not yet completely created or you are trying to > access the CSOUND dataspace at the same time from > two threads and they are interfering. You can try using > locks to synchronise access, if that's the problem. > > Victor > > >>>1. is csoundthread::csound created properly? >> >>Yes, at least everything else runs fine when I comment out >>my ..setCsoundCallback() >> >> >>>2. is it a public member of the class? >> >>Yes. >> >> >>>3. Does the violation happen at the call to >> >>..setCallback()? Or >is it when the callback is first >>invoked by csound? >> >>Mmm, I just tried to find this out and I noticed that if I >>put a Sleep(100) just before I call >>CsoundSetMessageCallback() it runs fine, messages and >>everything. Any ideas? I don't mind a slight pause before >>execution. >> >>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 >>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 > 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 |
Date | 2006-01-19 20:54 |
From | Istvan Varga |
Subject | Re: [Cs-dev] Callback functions... |
Attachments | None |
Date | 2006-01-19 21:04 |
From | Rory Walsh |
Subject | Re: [Cs-dev] Callback functions... |
Cheers, I think setting the callback in the thread is the easiest for now. Rory. Istvan Varga wrote: > On Thursday 19 January 2006 21:14, Rory Walsh wrote: > > >>>Does the Csound instance creation happen in a separate thread? >> >>Yes. I think as you said it's a case of Csound not being fully created >>when I call my message function. I will try to clean it up. Having a >>slight pause is not too much of a problem anyhow, but it will make > > > Instead of the pause, you could wait on a lock that is signaled by > the Csound thread, or just set the callback in the Csound thread. > > > > ------------------------------------------------------- > 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 |