On Fri, Jan 28, 2011 at 11:30 AM, WoodHacker <ramsa...@comcast.net> wrote:
> Hi,
>
> I'm trying to get the midi sound class in Java to work in Clojure.
> Everything seems to work fine except for the conversion of the
> following Java code:
>
>     MidiChannel[] channels = synthesizer.getChannels;
>
> I've tried just dumping the channels into a Clojure object -
>          (let [channels (.getChannels @synthesizer)]
> but I get the following error:
>
> Exception in thread "main" java.lang.IllegalArgumentException: Can't
> call public method of non-public class: public
> javax.sound.midi.MidiChannel[]
> com.sun.media.sound.AbstractPlayer.getChannels()

I don't think this is an array issue at all, but one to do with
overload resolution and Clojure's use of reflection.

Try hinting @synthesizer like this:

(let [channels (.getChannels ^Synthesizer @synthesizer)] ...)

and see if that makes it work.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to