Index: roard/clients.c
===================================================================
--- roard/clients.c	(revision 5295)
+++ roard/clients.c	(revision 5301)
@@ -798,5 +798,5 @@
 }
 
-int clients_add_output (int id, struct roar_buffer * buf) {
+int clients_add_output (int id, struct roar_buffer ** buf) {
  struct roar_client_server   * cs;
 
@@ -805,7 +805,7 @@
 
  if ( cs->outbuf == NULL ) {
-  cs->outbuf = buf;
+  cs->outbuf = *buf;
  } else {
-  return roar_buffer_add(cs->outbuf, buf);
+  return roar_buffer_moveinto(cs->outbuf, buf);
  }
 
Index: roard/codecfilter_fishsound.c
===================================================================
--- roard/codecfilter_fishsound.c	(revision 5242)
+++ roard/codecfilter_fishsound.c	(revision 5301)
@@ -84,5 +84,5 @@
   self->buffer = buf;
  } else {
-  if ( roar_buffer_add(self->buffer, buf) == -1 ) {
+  if ( roar_buffer_moveinto(self->buffer, &buf) == -1 ) {
    roar_buffer_free(buf);
    return -1;
Index: roard/codecfilter_flac.c
===================================================================
--- roard/codecfilter_flac.c	(revision 5242)
+++ roard/codecfilter_flac.c	(revision 5301)
@@ -101,5 +101,5 @@
   self->decoder.written = buf;
  } else {
-  if ( roar_buffer_add(self->decoder.written, buf) == -1 ) {
+  if ( roar_buffer_moveinto(self->decoder.written, &buf) == -1 ) {
    roar_buffer_free(buf);
    return FLAC__STREAM_DECODER_WRITE_STATUS_ABORT;
Index: roard/include/client.h
===================================================================
--- roard/include/client.h	(revision 5275)
+++ roard/include/client.h	(revision 5301)
@@ -113,5 +113,5 @@
 int clients_send_filter(struct roar_audio_info * sa, uint32_t pos);
 
-int clients_add_output (int id, struct roar_buffer * buf);
+int clients_add_output (int id, struct roar_buffer ** buf);
 
 // proto support
Index: roard/include/streams.h
===================================================================
--- roard/include/streams.h	(revision 5288)
+++ roard/include/streams.h	(revision 5301)
@@ -187,5 +187,5 @@
 int streams_ctl          (int id, int_least32_t cmd, void * data);
 
-int stream_add_buffer     (int id, struct roar_buffer *  buf);
+int stream_add_buffer     (int id, struct roar_buffer **  buf);
 //int stream_get_buffer     (int id, struct roar_buffer ** buf);
 int stream_shift_out_buffer   (int id, void * data, size_t * len);
@@ -196,5 +196,5 @@
 int stream_outputbuffer_destroy(int id);
 
-int stream_prethru_add(int id, struct roar_buffer * buf);
+int stream_prethru_add(int id, struct roar_buffer ** buf);
 int stream_prethru_add_data(int id, void ** buf, size_t len);
 int stream_prethru_destroy(int id);
Index: roard/midi.c
===================================================================
--- roard/midi.c	(revision 5278)
+++ roard/midi.c	(revision 5301)
@@ -186,5 +186,5 @@
  }
 
- if ( stream_add_buffer(id, b) == -1 ) {
+ if ( stream_add_buffer(id, &b) == -1 ) {
   roar_buffer_free(b);
   streams_delete(id);
@@ -714,5 +714,5 @@
   g_midi_mess.buf = buf;
  } else {
-  if ( roar_buffer_add(g_midi_mess.buf, buf) == -1 ) {
+  if ( roar_buffer_moveinto(g_midi_mess.buf, &buf) == -1 ) {
    ROAR_DBG("midi_add_buf(*) = -1");
    return -1;
Index: roard/req.c
===================================================================
--- roard/req.c	(revision 5295)
+++ roard/req.c	(revision 5301)
@@ -1762,5 +1762,5 @@
  }
 
- if ( stream_add_buffer(mes->stream, b) == -1 ) {
+ if ( stream_add_buffer(mes->stream, &b) == -1 ) {
   roar_buffer_free(b);
   return -1;
Index: roard/sample.c
===================================================================
--- roard/sample.c	(revision 5192)
+++ roard/sample.c	(revision 5301)
@@ -114,5 +114,5 @@
   c->data = new;
  } else {
-  if ( roar_buffer_add(c->data, new) == -1 ) {
+  if ( roar_buffer_moveinto(c->data, &new) == -1 ) {
    save_err = roar_error;
    roar_buffer_free(new);
Index: roard/ssynth.c
===================================================================
--- roard/ssynth.c	(revision 5194)
+++ roard/ssynth.c	(revision 5301)
@@ -181,5 +181,5 @@
   }
 
-  if ( stream_add_buffer(g_ssynth.stream, outbuf) == -1 ) {
+  if ( stream_add_buffer(g_ssynth.stream, &outbuf) == -1 ) {
    roar_buffer_free(outbuf);
    return -1;
Index: roard/streams.c
===================================================================
--- roard/streams.c	(revision 5288)
+++ roard/streams.c	(revision 5301)
@@ -1945,5 +1945,5 @@
 
 
-int stream_add_buffer  (int id, struct roar_buffer * buf) {
+int stream_add_buffer  (int id, struct roar_buffer ** buf) {
  ROAR_DBG("stream_add_buffer(id=%i, buf=%p) = ?", id, buf);
 
@@ -1951,5 +1951,6 @@
 
  if ( g_streams[id]->buffer == NULL ) {
-  g_streams[id]->buffer = buf;
+  g_streams[id]->buffer = *buf;
+  *buf = NULL;
   ROAR_DBG("stream_add_buffer(id=%i, buf=%p) = 0", id, buf);
   return 0;
@@ -1957,5 +1958,5 @@
 
  ROAR_DBG("stream_add_buffer(id=%i, buf=%p) = ?", id, buf);
- return roar_buffer_add(g_streams[id]->buffer, buf);
+ return roar_buffer_moveinto(g_streams[id]->buffer, buf);
 }
 
@@ -2041,5 +2042,5 @@
 }
 
-int stream_prethru_add(int id, struct roar_buffer * buf) {
+int stream_prethru_add(int id, struct roar_buffer ** buf) {
  register struct roar_stream_server *  ss;
 
@@ -2050,9 +2051,10 @@
 
  if ( ss->prethru == NULL ) {
-  ss->prethru = buf;
+  ss->prethru = *buf;
+  *buf = NULL;
   return 0;
  }
 
- if ( roar_buffer_add(ss->prethru, buf) == -1 ) {
+ if ( roar_buffer_moveinto(ss->prethru, buf) == -1 ) {
   return -1;
  }
@@ -2066,13 +2068,8 @@
  _CHECK_SID(id);
 
- if ( roar_buffer_new(&buffer, len) == -1 )
-  return -1;
-
- if ( roar_buffer_get_data(buffer, buf) == -1 ) {
-  roar_buffer_free(buffer);
-  return -1;
- }
-
- if ( stream_prethru_add(id, buffer) == -1 ) {
+ if ( roar_buffer_new_data(&buffer, len, buf) == -1 )
+  return -1;
+
+ if ( stream_prethru_add(id, &buffer) == -1 ) {
   roar_buffer_free(buffer);
   return -1;
@@ -2263,5 +2260,5 @@
 
   if ( roar_buffer_set_len(b, req) != -1 ) {
-   if ( stream_add_buffer(id, b) != -1 )
+   if ( stream_add_buffer(id, &b) != -1 )
     return 0;
 
Index: roard/waveform.c
===================================================================
--- roard/waveform.c	(revision 5194)
+++ roard/waveform.c	(revision 5301)
@@ -133,5 +133,5 @@
   }
 
-  if ( stream_add_buffer(g_waveform_recbridge.stream, buf) == -1 ) {
+  if ( stream_add_buffer(g_waveform_recbridge.stream, &buf) == -1 ) {
    ROAR_ERR("waveform_update_inputs(void): Can not attach a new buffer object to the Record Bridge. Bad.");
    roar_buffer_free(buf);
