     @status*))
 
 (defn wait-sync
-  "Wait until the audio server has completed all asynchronous commands currently in execution."
+  "Wait until the audio server has completed all asynchronous commands
+  currently in execution."
   [& [timeout]]
   (let [sync-id (rand-int 999999)
         reply-p (recv "/synced")

    (print msg)))

(defn recv
  "Register your intent to wait for a message associated with given path to be received from the server. Returns a promise that will contain the message once it has been received. Does not block current thread (this only happens once you try and look inside the promise and the reply has not yet been received)."
  [path]
  (let [p (promise)]
    (on-sync-event path (uuid) #(do (deliver p %) :done))
    p))

(defn await-promise
  "Read the reply received from the server, waiting for timeout ms if the message hasn't yet been received. Returns :timeout if a timeout occurs."
  ([prom] (await-promise prom REPLY-TIMEOUT))
  ([prom timeout]
     (try

         :timeout))))

(defn await-promise!
  "Read the reply received from the server, waiting for timeout ms if the
  message hasn't yet been received. Raises an exception if the message hasn't
  been received within timeout ms"
  ([prom] (await-promise prom REPLY-TIMEOUT))
  ([prom timeout]
     (.get (future @prom) timeout TimeUnit/MILLISECONDS)))
