This is a possible roadmap to improve the current Jack support in Csound. It would allow a gradual change without (AFAIK) breaking anything on the way. First phase ----------- * Add two more variables to the global Csound 'object' struct: - ninputs - noutputs as well as the required data structures to store any number of Jack ports (a Jack port is represented by a single pointer, the number is fixed after startup, and there could also be 'reasonable' absolute limits). * Allow the user to set these values when using Jack, and create this number of input and output ports with default names. * Ensure that 'nchannels' can not be set higher than min (ninputs, noutputs), and initialise the existing audio ports array from the first nchannels jack ports. This ensures that current opcodes will continue to work also with Jack. * Implement new audio I/O opcodes using ninputs and noutputs, and allowing I/O to any subset of inputs or outputs, or at least to each single one separately. In the first phase these opcodes would be available only when using Jack. * (optional) Provide opcodes to change the default names of Csound's Jack ports. * (optional) Provide opcodes to connect/disconnect Csound's Jack ports to/from external applications. * (optional, orthogonal to all the rest) Remove the buffering between Jack and Csound's internals, and require nsmps * k = period, for integer k. Modify 'unsafe' opcodes (diskin, diskout etc.) to make them RT-safe (this means adding read-ahead, write-behind in a separate thread). Second phase, as time permits ----------------------------- * Modify the existing audio I/O opcodes to use ninputs and noutputs and the corresponding data structures, making them independent of the old ones. * Modify the other audio interfaces to use ninputs and noutputs. * Make assignment to nchannels set both ninputs and noutputs, but encourage users to use the latter two directly. Mark nchannels as 'deprecated'. Allow some time to pass. Third phase ----------- * Remove nchannels and everything related, as nothing should depend on it anymore. Ciao, -- FA O tu, che porte, correndo si ? E guerra e morte ! ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net