         samples
         (let [msg-p (recv "/b_setn")
               msg (await-promise! msg-p)
-              ;_ (println "b_setn msg: " (take 3 (:args msg)))
               [buf-id bstart blen & samps] (:args msg)]
           (loop [idx bstart
                  samps samps]

              (recur (inc idx) (next samps))))
          (recur (+ recvd blen)))))))

;; TODO: test me...
(defn buffer-write
  "Write into a section of an audio buffer."
  [buf start len data]
  (assert (buffer? buf))
  (snd "/b_setn" (:id buf) start len data))

(defn buffer-save
  "Save the float audio data in an audio buffer to a wav file."

    (free-id :audio-buffer id)
    :done))

(defn buffer-read
  "Read a section of an audio buffer."
  [buf start len]
