[Cs-dev] CsoundReset() and MIDI
Date | 2005-11-01 13:59 |
From | Victor Lazzarini |
Subject | [Cs-dev] CsoundReset() and MIDI |
Is it possible that csoundReset() is not closing the MIDI (and perhaps the rt audio) module? David Akbari's problems with tclcsound (cstclsh), seem to indicate that something is no quite right there. He says that a second compilation (after csStop, which calls csoundReset()) fails because MIDI cannot be initialised (and the audio interface seems also to still be open). Of course, I could implement csStop with a full clean-up using csoundDestroy() and then csoundCreate(), but I suppose that it is not how the API should be used, is it? From the description of csoundReset(), we should supposedly be able to run any number of compilations on the same instance of CSOUND, by calling it. I cannot test MIDI at the moment, because I am out of the office and with no external hardware. But perhaps Istvan can have a look at the csound library code and re-assure me that all is correct on that side, so I can look for other reasons for this problem. Victor ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2005-11-01 14:17 |
From | David Akbari |
Subject | Re: [Cs-dev] CsoundReset() and MIDI |
On Nov 1, 2005, at 8:59 AM, Victor Lazzarini wrote: > David Akbari's problems with tclcsound (cstclsh), > seem to indicate that something is no quite > right there. He says that a second compilation > (after csStop, which calls csoundReset()) fails > because MIDI cannot be initialised (and the > audio interface seems also to still be open). It may also be worth noting that simply exiting and restarting the TCL interpreter fixes it! That's been my interim solution :) -David ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2005-11-01 14:40 |
From | Istvan Varga |
Subject | Re: [Cs-dev] CsoundReset() and MIDI |
Victor Lazzarini wrote: > Of course, I could implement csStop with a full > clean-up using csoundDestroy() and then > csoundCreate(), but I suppose that it is not > how the API should be used, is it? From the > description of csoundReset(), we should supposedly > be able to run any number of compilations on the > same instance of CSOUND, by calling it. csoundCleanup() should close the devices, and csoundReset() also unloads the plugin libraries and in the case of PortMidi, Pm_Terminate() is called as well. csoundDestroy() basically only differs from reset in that it also deallocates the CSOUND structure. It may be possible that PortMidi cannot be initialized more than once on the Mac, in which case we probably need to write a native driver (there are already MIDI drivers for ALSA and Windows MME). ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |