Csound Csound-dev Csound-tekno Search About

[Cs-dev] Java API: Csound::Compile()

Date2005-11-15 22:49
FromVictor Lazzarini
Subject[Cs-dev] Java API: Csound::Compile()
I was playing with the Java wrapper and I was wondering
whether it would be possible to provide a Csound::Compile
method that takes an argument count and an array of
String objects. The problem with the available methods
is that they seem to be limiting. For instance, a simple
code to take any number of command line arguments is
not possible. An ugly hack can be used to select one of the
Compile
methods with different number of String arguments, but
that's
horrible.

Is it not possible to provide a more direct connection
between String[] and char ** ?

I don't really know much of Java, but I don't think the
SWIG-generated type for char** is usable at all, if it is
can someone show me how to use it?

This simple code creates a command-line version of
csound with Java, but it only takes .csds;

import csnd.Csound;

public class cstest {

    public static void main(String[] args) {
        Csound cs  = new Csound();
        cs.Compile(args[0]);
        cs.Perform();
        cs.Reset();
    }
        };

I wanted to try to make it accept any number of args just
like
a csound command.

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. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net