   very slow."
   ([buf data] (buffer-write-relay! buf 0 data))
   ([buf start-idx data]
+     (ensure-buffer-active! buf)
      (assert (buffer? buf))
      (loop [data-left data
             idx       0]

  the server. Index defaults to 0 if not specified."
  ([buf val] (buffer-set! buf 0 val))
  ([buf index val]
     (assert (buffer? buf))
     (snd "/b_set" (:id buf) index (double val))
     buf))

   (buffer-save buf \"~/Desktop/foo.wav\" :header \"aiff\" :samples \"int32\"
                                          :start-frame 100)"
  [buf path & args]
  (ensure-buffer-active! buf)
  (assert (buffer? buf))

  (let [path (resolve-tilde-path path)
