Index: include/libroar/vio_dstr.h
===================================================================
--- include/libroar/vio_dstr.h	(revision 5254)
+++ include/libroar/vio_dstr.h	(revision 5257)
@@ -197,4 +197,6 @@
 int     roar_vio_open_default (struct roar_vio_calls * calls, struct roar_vio_defaults * def, char * opts);
 
+int     roar_vio_open_dstr_simple(struct roar_vio_calls * calls, const char * dstr, int o_flags);
+
 int     roar_vio_open_dstr    (struct roar_vio_calls * calls, const char * dstr, struct roar_vio_defaults * def, int dnum);
 int     roar_vio_open_dstr_vio(struct roar_vio_calls * calls, const char * dstr, struct roar_vio_defaults * def, int dnum, struct roar_vio_calls * vio);
Index: libroar/vio_dstr.c
===================================================================
--- libroar/vio_dstr.c	(revision 5254)
+++ libroar/vio_dstr.c	(revision 5257)
@@ -389,4 +389,16 @@
 #endif
 
+int     roar_vio_open_dstr_simple(struct roar_vio_calls * calls, const char * dstr, int o_flags) {
+ struct roar_vio_defaults def;
+
+ if ( roar_vio_dstr_init_defaults(&def, ROAR_VIO_DEF_TYPE_NONE, o_flags, 0644) == -1 )
+  return -1;
+
+ if ( roar_vio_open_dstr_vio(calls, dstr, &def, 1, NULL) == -1 )
+  return -1;
+
+ return 0;
+}
+
 int     roar_vio_open_dstr    (struct roar_vio_calls * calls, const char * dstr, struct roar_vio_defaults * def, int dnum) {
  return roar_vio_open_dstr_vio(calls, dstr, def, dnum, NULL);
Index: roard/roard.c
===================================================================
--- roard/roard.c	(revision 5255)
+++ roard/roard.c	(revision 5257)
@@ -471,5 +471,5 @@
 
  if ( pidfile != NULL ) {
-  if ( roar_vio_open_file(&fh, pidfile, O_RDONLY, 0644) == -1 ) {
+  if ( roar_vio_open_dstr_simple(&fh, pidfile, O_RDONLY) ) {
    ROAR_WARN("restart_server(*): Can not read pidfile: %s", pidfile);
   } else {
@@ -2519,5 +2519,5 @@
 #ifdef SUPPORT_PIDFILE
  if ( pidfile != NULL ) {
-  if ( roar_vio_open_file(&pidfile_vio, pidfile, O_WRONLY|O_CREAT, 0644) == -1 ) {
+  if ( roar_vio_open_dstr_simple(&pidfile_vio, pidfile, O_WRONLY|O_CREAT) == -1 ) {
    ROAR_ERR("Can not write pidfile: %s", pidfile);
   } else {
Index: roard/streams.c
===================================================================
--- roard/streams.c	(revision 5256)
+++ roard/streams.c	(revision 5257)
@@ -1429,5 +1429,8 @@
      if ( tsubsys == subsys || tsubsys == ROAR_SUBSYS_NONE ) {
       if ( &(pmss->mixer) != &(ss->mixer) ) {
-       roar_conv_volume(&(pmss->mixer), &(ss->mixer), ROAR_STREAM(pmss)->info.channels, ROAR_STREAM(ss)->info.channels);
+       if ( roar_conv_volume(&(pmss->mixer), &(ss->mixer),
+                             ROAR_STREAM(pmss)->info.channels, ROAR_STREAM(ss)->info.channels) == -1 ) {
+        ROAR_WARN("streams_set_mixer(id=%i): Can not convert mixer settings for stream %i", id, i);
+       }
       }
 
@@ -1966,38 +1969,4 @@
 }
 
-int stream_shift_buffer   (int id, struct roar_buffer ** buf) {
- struct roar_buffer * next;
-
- _CHECK_SID(id);
-
- if ( g_streams[id]->buffer == NULL ) {
-  *buf = NULL;
-  return 0;
- }
-
- roar_buffer_get_next(g_streams[id]->buffer, &next);
-
- *buf                  = g_streams[id]->buffer;
- g_streams[id]->buffer = next;
-
- return 0;
-}
-int stream_unshift_buffer (int id, struct roar_buffer *  buf) {
- _CHECK_SID(id);
-
- if ( g_streams[id]->buffer == NULL ) {
-  g_streams[id]->buffer = buf;
-  return 0;
- }
-
- roar_buffer_clear_next(buf);
-
- roar_buffer_add(buf, g_streams[id]->buffer);
-
- g_streams[id]->buffer = buf;
-
- return 0;
-}
-
 int stream_outputbuffer_request(int id, struct roar_buffer ** buf, size_t len) {
  register struct roar_stream_server *  ss;
@@ -2286,5 +2255,4 @@
   req = done;
 
-  roar_buffer_get_data(b, &buf);
  } else {
   req = codecfilter_read(ss->codecfilter_inst, ss->codecfilter, buf, req);
@@ -2294,10 +2262,13 @@
   ROAR_DBG("streams_check(id=%i): got %i bytes", id, req);
 
-  roar_buffer_set_len(b, req);
-
-  if ( stream_add_buffer(id, b) != -1 )
-   return 0;
-
-  ROAR_ERR("streams_check(id=%i): something is wrong, could not add buffer to stream!", id);
+  if ( roar_buffer_set_len(b, req) != -1 ) {
+   if ( stream_add_buffer(id, b) != -1 )
+    return 0;
+
+   ROAR_ERR("streams_check(id=%i): something is wrong, could not add buffer to stream!", id);
+  } else {
+   ROAR_ERR("streams_check(id=%i): something is wrong, could not set size of buffer!", id);
+  }
+
   roar_buffer_free(b);
  } else {
