I'm trying to write a function to play a sound file once, using some resources I found. The code is as follows:
(defn play [file] (let [songp (URL. (.getCodeBase) file) song (.newAudioClip songp)] (. song play)))
The problem is, (.getCodeBase) is a malformed member expression. I'm not sure what to do. How do you call a method like this? In the Java code I looked at, it was simply called like so:
getCodeBase()
Am I missing something?