   []
   (snd "/clearSched"))
 
-; The /done message just has a single argument:
-; "/done" "s" <completed-command>
-;
-; where the command would be /b_alloc and others.
+;; The /done message just has a single argument:
+;; "/done" "s" <completed-command>
+;;
+;; where the command would be /b_alloc and others.
 (defn on-done
   "Runs a one shot handler that takes no arguments when an OSC /done
   message from scsynth arrives with a matching path.  Look at load-sample

  (if @server*
    (osc-close @server* true))
  (dosync
    (ref-set server* nil)
    (ref-set status* :disconnected)
    (unsatisfy-all-dependencies)))

(defonce _shutdown-hook
  (.addShutdownHook (Runtime/getRuntime)

(ns
    ^{:doc "An interface to the SuperCollider synthesis server.
          This is at heart an OSC client library for the SuperCollider
          scsynth DSP engine."
      :author "Jeff Rose"}
  overtone.sc.core
  (:import
   [java.net InetSocketAddress]
   [java.util.regex Pattern]
   [java.util.concurrent TimeUnit TimeoutException]
   [java.io BufferedInputStream]
   [supercollider ScSynth ScSynthStartedListener MessageReceivedListener])
  (:require [overtone.log :as log])
  (:use
   [overtone event config setup util time-utils deps]
   [overtone.sc allocator]
   [clojure.contrib.java-utils :only [file]]
   [clojure.contrib pprint]
   [clojure.contrib shell-out]
   osc))

(def SERVER-HOST "127.0.0.1")
(def SERVER-PORT nil) ; nil means a random port
(def N-RETRIES 20)

;; Max number of milliseconds to wait for a reply from the server
(def REPLY-TIMEOUT 500)

(def MAX-OSC-SAMPLES 8192)
