Index: ChangeLog
===================================================================
--- ChangeLog	(revision 5376)
+++ ChangeLog	(revision 5377)
@@ -4,5 +4,5 @@
 	* Do not set errno to zero in ogg_vorbis codec filter (Closes: #191)
 	* Updated data types for struct roar_audio_info (Closes: #189)
-	* Removed old functions from API (Closes: #186, #187, See: #130)
+	* Removed old functions from API (Closes: #186, #187, #130)
 	* Removed old roarclients (See: #130)
 	* Improved plugin loader a lot (Closes: #190)
Index: include/libroar/simple.h
===================================================================
--- include/libroar/simple.h	(revision 5289)
+++ include/libroar/simple.h	(revision 5377)
@@ -44,6 +44,4 @@
 int roar_simple_new_stream_attachexeced_obj (struct roar_connection * con, struct roar_stream * s, uint32_t rate, uint32_t channels, uint32_t bits, uint32_t codec, int dir, int mixer);
 
-int roar_simple_new_stream_obj (struct roar_connection * con, struct roar_stream * s, uint32_t rate, uint32_t channels, uint32_t bits, uint32_t codec, int dir, int mixer) _LIBROAR_ATTR_DEPRECATED;
-
 int roar_simple_play_file(const char * file, const char * server, const char * name);
 
Index: include/libroar/vio.h
===================================================================
--- include/libroar/vio.h	(revision 5366)
+++ include/libroar/vio.h	(revision 5377)
@@ -70,12 +70,5 @@
 };
 
-int roar_vio_init_calls (struct roar_vio_calls * calls) _LIBROAR_ATTR_TO_STATIC;
-
 int roar_vio_clear_calls (struct roar_vio_calls * calls);
-
-int roar_vio_set_inst (struct roar_vio_calls * vio, void * inst);
-int roar_vio_set_fh   (struct roar_vio_calls * vio, int fh) _LIBROAR_ATTR_TO_STATIC;
-
-int roar_vio_get_fh   (struct roar_vio_calls * vio) _LIBROAR_ATTR_TO_STATIC;
 
 ssize_t roar_vio_read    (struct roar_vio_calls * vio, void *buf, size_t count) _LIBROAR_ATTR_USE_RESULT _LIBROAR_ATTR_NONNULL_ALL;
@@ -92,5 +85,4 @@
 
 // converters:
-int     roar_vio_open_file     (struct roar_vio_calls * calls, const char * filename, int flags, mode_t mode) _LIBROAR_ATTR_DEPRECATED _LIBROAR_ATTR_NONNULL_ALL;
 int     roar_vio_open_fh       (struct roar_vio_calls * calls, int fh) _LIBROAR_ATTR_NONNULL_ALL;
 int     roar_vio_open_fh_socket(struct roar_vio_calls * calls, int fh) _LIBROAR_ATTR_NONNULL_ALL;
Index: libroar/simple.c
===================================================================
--- libroar/simple.c	(revision 5296)
+++ libroar/simple.c	(revision 5377)
@@ -36,5 +36,5 @@
 #include "libroar.h"
 
-static int roar_simple_stream_obj  (struct roar_stream * s, uint32_t rate, uint32_t channels, uint32_t bits, uint32_t codec, const char * server, int dir, const char * name, int mixer) _LIBROAR_ATTR_DEPRECATED;
+static int roar_simple_stream_obj  (struct roar_stream * s, uint32_t rate, uint32_t channels, uint32_t bits, uint32_t codec, const char * server, int dir, const char * name, int mixer);
 
 int roar_simple_connect (struct roar_connection * con, const char * server, const char * name) {
@@ -136,248 +136,4 @@
 }
 
-int roar_simple_new_stream_obj (struct roar_connection * con, struct roar_stream * s, uint32_t rate, uint32_t channels, uint32_t bits, uint32_t codec, int dir, int mixer) {
- struct roar_libroar_config * config = roar_libroar_get_config();
- char file[80] = {0};
- int fh = -1, listen = -1;
- static int count = 0;
- int    type = ROAR_SOCKET_TYPE_UNIX;
- int    port = 0;
-#if defined(ROAR_HAVE_IPV4) || defined(ROAR_HAVE_LIBDNET)
- int    opt  = 1;
-#endif
-#ifdef ROAR_HAVE_IPV4
- struct sockaddr_in   socket_addr;
- socklen_t            len            = sizeof(struct sockaddr_in);
-#else
- struct sockaddr      socket_addr;
- socklen_t            len            = sizeof(struct sockaddr);
-#endif
-#ifdef ROAR_HAVE_SELECT
- int confh;
- fd_set fds;
- struct timeval timeout = {10, 0};
- struct roar_message    mes;
-#endif
-#ifdef ROAR_HAVE_UNIX
- int socks[2]; // for socketpair()
-#endif
-
- // make valgrind happy
- memset(&socket_addr, 0, sizeof(socket_addr));
-#ifdef ROAR_HAVE_SELECT
- memset(&mes,         0, sizeof(mes));
-#endif
-
- roar_debug_warn_sysio("roar_simple_new_stream_obj", "roar_vio_simple_new_stream_obj", NULL);
-
- if ( config != NULL ) {
-  if ( config->workaround.workarounds & ROAR_LIBROAR_CONFIG_WAS_USE_EXECED ) {
-   return roar_simple_new_stream_attachexeced_obj(con, s, rate, channels, bits, codec, dir, mixer);
-  }
- }
-
-#ifdef ROAR_HAVE_BSDSOCKETS
- roar_libroar_nowarn();
- if ( getsockname(roar_get_connection_fh(con), (struct sockaddr *)&socket_addr, &len) == -1 ) {
-  roar_libroar_warn();
-  return -1;
- }
- roar_libroar_warn();
-#else
- return -1;
-#endif
-
- if ( len == 0 ) {
-#ifdef ROAR_OS_OPENBSD
-  ROAR_WARN("roar_simple_new_stream_obj(*): Unknown address family: guess AF_UNIX because OS is OpenBSD");
-  ((struct sockaddr*)&socket_addr)->sa_family = AF_UNIX;
-#else
-  return -1;
-#endif
- }
-
- switch (((struct sockaddr*)&socket_addr)->sa_family) {
-#ifdef ROAR_HAVE_UNIX
-  case AF_UNIX:   type = ROAR_SOCKET_TYPE_UNIX; break;
-#endif
-#ifdef ROAR_HAVE_IPV4
-  case AF_INET:   type = ROAR_SOCKET_TYPE_INET; break;
-#endif
-#ifdef ROAR_HAVE_LIBDNET
-  case AF_DECnet: type = ROAR_SOCKET_TYPE_DECNET; break;
-#endif
-  default:
-    return -1;
-   break;
- }
-
- if ( type == ROAR_SOCKET_TYPE_DECNET ) {
-  if ( roar_socket_get_local_nodename() ) {
-   snprintf(file, 24, "%s::roar$TMP%04x%02x", roar_socket_get_local_nodename(), getpid(), count++);
-  } else {
-   return -1;
-  }
-#ifdef ROAR_HAVE_IPV4
- } else {
-  strncpy(file, inet_ntoa(socket_addr.sin_addr), sizeof(file) - 1);
-#endif
- }
-
- if ( type != ROAR_SOCKET_TYPE_UNIX ) {
-  if ( (listen = roar_socket_listen(type, file, port)) == -1 ) {
-   return -1;
-  }
- }
-
- if ( type == ROAR_SOCKET_TYPE_INET ) {
-#ifdef ROAR_HAVE_IPV4
-  len = sizeof(struct sockaddr_in);
-  setsockopt(listen, SOL_SOCKET, SO_REUSEADDR, (void*)&opt, sizeof(int));
-
-  if ( getsockname(listen, (struct sockaddr *)&socket_addr, &len) == -1 ) {
-   return -1;
-  }
-  port = ROAR_NET2HOST16(socket_addr.sin_port);
-  ROAR_DBG("roar_simple_new_stream_obj(*): port=%i", port);
-#else
-  return -1;
-#endif
- } else if ( type == ROAR_SOCKET_TYPE_DECNET ) {
-#ifdef ROAR_HAVE_LIBDNET
-  len = sizeof(struct sockaddr_in);
-  setsockopt(listen, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(int));
-#else
-  return -1;
-#endif
- }
-
- if ( roar_stream_new(s, rate, channels, bits, codec) == -1 ) {
-  return -1;
- }
-
- if ( roar_stream_connect(con, s, dir, mixer) == -1 ) {
-  return -1;
- }
-
- if ( type != ROAR_SOCKET_TYPE_UNIX ) {
-#ifdef ROAR_HAVE_SELECT
-  if ( roar_stream_connect_to_ask(con, s, type, file, port) != -1 ) {
-
-   FD_ZERO(&fds);
-   FD_SET(listen, &fds);
-
-   confh = roar_get_connection_fh(con);
-
-   if ( confh != -1 ) {
-    FD_SET(confh, &fds);
-   }
-
-   if ( select((confh > listen ? confh : listen) + 1, &fds, NULL, NULL, &timeout) < 1 ) {
-    close(listen);
-
-    // we don't need to check the content as we know it failed...
-    if ( roar_recv_message(con, &mes, NULL) == -1 )
-     return -1;
-
-    if ( roar_kick(con, ROAR_OT_STREAM, s->id) == -1 )
-     return -1;
-
-    return roar_simple_new_stream_attachexeced_obj(con, s, rate, channels, bits, codec, dir, mixer);
-   }
-
-   if ( FD_ISSET(listen, &fds) ) {
-    if ( (fh = accept(listen, NULL, NULL)) != -1 ) {
-     /* errr, do we need we any error handling here? */
-    }
-
-    if ( roar_recv_message(con, &mes, NULL) == -1 ) {
-     if ( fh != -1 )
-      close(fh);
-     fh = -1;
-    } else if ( mes.cmd != ROAR_CMD_OK ) {
-     if ( fh != -1 )
-      close(fh);
-     fh = -1;
-    }
-   } else {
-    // we don't need to check the content as we know it failed...
-    if ( roar_recv_message(con, &mes, NULL) == -1 ) {
-     close(listen);
-     return -1;
-    }
-
-    if ( mes.cmd != ROAR_CMD_OK ) {
-     close(listen);
-     if ( roar_kick(con, ROAR_OT_STREAM, s->id) == -1 )
-      return -1;
-
-     return roar_simple_new_stream_attachexeced_obj(con, s, rate, channels, bits, codec, dir, mixer);
-    } else { // seems like we have a positive reply. So we retry the listen socket:
-     FD_ZERO(&fds);
-     FD_SET(listen, &fds);
-     timeout.tv_sec = 0;
-     timeout.tv_usec = 128000L;
-     fh = -1;
-     if ( select(listen + 1, &fds, NULL, NULL, &timeout) > 0 ) {
-      if ( (fh = accept(listen, NULL, NULL)) == -1 ) {
-       close(listen);
-       if ( roar_kick(con, ROAR_OT_STREAM, s->id) == -1 )
-        return -1;
-
-       return roar_simple_new_stream_attachexeced_obj(con, s, rate, channels, bits, codec, dir, mixer);
-      }
-     }
-    }
-   }
-  }
-
-  close(listen);
-#else
-  return -1;
-#endif
- } else { // this is type == ROAR_SOCKET_TYPE_UNIX
-#ifdef ROAR_HAVE_UNIX
-  if ( socketpair(AF_UNIX, SOCK_STREAM, 0, socks) == -1 ) {
-   roar_kick(con, ROAR_OT_STREAM, s->id); // we do not need to check for errors
-                                          // as we return -1 in both whys
-   return -1;
-  }
-
-  if ( roar_stream_passfh(con, s, socks[0]) == -1 ) {
-   roar_kick(con, ROAR_OT_STREAM, s->id); // we do not need to check for errors
-                                          // as we return -1 anyway.
-   close(socks[0]);
-   close(socks[1]);
-   return -1;
-  }
-
-  close(socks[0]);
-  fh = socks[1];
-#else
-  roar_kick(con, ROAR_OT_STREAM, s->id);
-  return -1;
-#endif
- }
-
-/*
- if ( type == ROAR_SOCKET_TYPE_UNIX ) {
-  unlink(file);
- }
-*/
-
- if ( fh != -1 ) {
-  if ( dir == ROAR_DIR_PLAY ) {
-   (void)ROAR_SHUTDOWN(fh, SHUT_RD);
-  } else if ( dir == ROAR_DIR_MONITOR || dir == ROAR_DIR_RECORD ) {
-   (void)ROAR_SHUTDOWN(fh, SHUT_WR);
-  }
- }
-
- s->fh = fh;
-
- return fh;
-}
-
-
 int roar_simple_play_file(const char * file, const char * server, const char * name) {
  roar_vs_t * vss;
Index: libroar/vio.c
===================================================================
--- libroar/vio.c	(revision 5375)
+++ libroar/vio.c	(revision 5377)
@@ -45,28 +45,4 @@
 #endif
 
-int roar_vio_init_calls (struct roar_vio_calls * calls) {
- roar_debug_warn_obsolete("roar_vio_init_calls", "roar_vio_clear_calls", NULL);
-
-#ifdef _CAN_OPERATE
- if ( calls == NULL ) {
-  roar_err_set(ROAR_ERROR_FAULT);
-  return -1;
- }
-
- memset((void*)calls, 0, sizeof(struct roar_vio_calls));
-
- calls->read     = roar_vio_basic_read;
- calls->write    = roar_vio_basic_write;
- calls->lseek    = roar_vio_basic_lseek;
- calls->sync     = roar_vio_basic_sync;
- calls->ctl      = roar_vio_basic_ctl;
- calls->close    = roar_vio_basic_close;
-
- return 0;
-#else
- return -1;
-#endif
-}
-
 int roar_vio_clear_calls (struct roar_vio_calls * calls) {
  if ( calls == NULL ) {
@@ -80,20 +56,5 @@
 }
 
-int roar_vio_set_inst (struct roar_vio_calls * vio, void * inst) {
- if ( vio == NULL ) {
-  roar_err_set(ROAR_ERROR_FAULT);
-  return -1;
- }
-
- vio->inst = inst;
-
- return 0;
-}
-
-int roar_vio_set_fh   (struct roar_vio_calls * vio, int fh) {
- return roar_vio_set_inst(vio, (void*)(ROAR_INSTINT)(fh + 1));
-}
-
-int roar_vio_get_fh   (struct roar_vio_calls * vio) {
+static int roar_vio_get_fh   (struct roar_vio_calls * vio) {
  if ( vio == NULL ) {
   roar_err_set(ROAR_ERROR_FAULT);
@@ -287,17 +248,4 @@
 
 // converters:
-int     roar_vio_open_file     (struct roar_vio_calls * calls, const char * filename, int flags, mode_t mode) {
- struct roar_vio_defaults def;
-
- roar_debug_warn_obsolete("roar_vio_open_file", "roar_vio_open_dstr", NULL);
-
- if ( roar_vio_dstr_init_defaults(&def, ROAR_VIO_DEF_TYPE_FILE, flags, mode) == -1 )
-  return -1;
-
- def.d.file = filename;
-
- return roar_vio_open_default(calls, &def, NULL);
-}
-
 int     roar_vio_open_fh       (struct roar_vio_calls * calls, int fh) {
  if ( calls == NULL ) {
@@ -306,12 +254,16 @@
  }
 
- roar_libroar_nowarn();
- if ( roar_vio_init_calls(calls) == -1 ) {
-  roar_libroar_warn();
-  return -1;
- }
- roar_libroar_warn();
-
- return roar_vio_set_fh(calls, fh);
+ memset((void*)calls, 0, sizeof(struct roar_vio_calls));
+
+ calls->read     = roar_vio_basic_read;
+ calls->write    = roar_vio_basic_write;
+ calls->lseek    = roar_vio_basic_lseek;
+ calls->sync     = roar_vio_basic_sync;
+ calls->ctl      = roar_vio_basic_ctl;
+ calls->close    = roar_vio_basic_close;
+
+ calls->inst     = (void*)(ROAR_INSTINT)(fh + 1);
+
+ return 0;
 }
 
Index: libroar/vio_stream.c
===================================================================
--- libroar/vio_stream.c	(revision 5289)
+++ libroar/vio_stream.c	(revision 5377)
@@ -157,4 +157,238 @@
 }
 
+static int _roar_simple_new_stream_obj (struct roar_connection * con, struct roar_stream * s, uint32_t rate, uint32_t channels, uint32_t bits, uint32_t codec, int dir, int mixer) {
+ struct roar_libroar_config * config = roar_libroar_get_config();
+ char file[80] = {0};
+ int fh = -1, listen = -1;
+ static int count = 0;
+ int    type = ROAR_SOCKET_TYPE_UNIX;
+ int    port = 0;
+#if defined(ROAR_HAVE_IPV4) || defined(ROAR_HAVE_LIBDNET)
+ int    opt  = 1;
+#endif
+#ifdef ROAR_HAVE_IPV4
+ struct sockaddr_in   socket_addr;
+ socklen_t            len            = sizeof(struct sockaddr_in);
+#else
+ struct sockaddr      socket_addr;
+ socklen_t            len            = sizeof(struct sockaddr);
+#endif
+#ifdef ROAR_HAVE_SELECT
+ int confh;
+ fd_set fds;
+ struct timeval timeout = {10, 0};
+ struct roar_message    mes;
+#endif
+#ifdef ROAR_HAVE_UNIX
+ int socks[2]; // for socketpair()
+#endif
+
+ // make valgrind happy
+ memset(&socket_addr, 0, sizeof(socket_addr));
+#ifdef ROAR_HAVE_SELECT
+ memset(&mes,         0, sizeof(mes));
+#endif
+
+ if ( config != NULL ) {
+  if ( config->workaround.workarounds & ROAR_LIBROAR_CONFIG_WAS_USE_EXECED ) {
+   return roar_simple_new_stream_attachexeced_obj(con, s, rate, channels, bits, codec, dir, mixer);
+  }
+ }
+
+#ifdef ROAR_HAVE_BSDSOCKETS
+ roar_libroar_nowarn();
+ if ( getsockname(roar_get_connection_fh(con), (struct sockaddr *)&socket_addr, &len) == -1 ) {
+  roar_libroar_warn();
+  return -1;
+ }
+ roar_libroar_warn();
+#else
+ return -1;
+#endif
+
+ if ( len == 0 ) {
+#ifdef ROAR_OS_OPENBSD
+  ROAR_WARN("roar_simple_new_stream_obj(*): Unknown address family: guess AF_UNIX because OS is OpenBSD");
+  ((struct sockaddr*)&socket_addr)->sa_family = AF_UNIX;
+#else
+  return -1;
+#endif
+ }
+
+ switch (((struct sockaddr*)&socket_addr)->sa_family) {
+#ifdef ROAR_HAVE_UNIX
+  case AF_UNIX:   type = ROAR_SOCKET_TYPE_UNIX; break;
+#endif
+#ifdef ROAR_HAVE_IPV4
+  case AF_INET:   type = ROAR_SOCKET_TYPE_INET; break;
+#endif
+#ifdef ROAR_HAVE_LIBDNET
+  case AF_DECnet: type = ROAR_SOCKET_TYPE_DECNET; break;
+#endif
+  default:
+    return -1;
+   break;
+ }
+
+ if ( type == ROAR_SOCKET_TYPE_DECNET ) {
+  if ( roar_socket_get_local_nodename() ) {
+   snprintf(file, 24, "%s::roar$TMP%04x%02x", roar_socket_get_local_nodename(), getpid(), count++);
+  } else {
+   return -1;
+  }
+#ifdef ROAR_HAVE_IPV4
+ } else {
+  strncpy(file, inet_ntoa(socket_addr.sin_addr), sizeof(file) - 1);
+#endif
+ }
+
+ if ( type != ROAR_SOCKET_TYPE_UNIX ) {
+  if ( (listen = roar_socket_listen(type, file, port)) == -1 ) {
+   return -1;
+  }
+ }
+
+ if ( type == ROAR_SOCKET_TYPE_INET ) {
+#ifdef ROAR_HAVE_IPV4
+  setsockopt(listen, SOL_SOCKET, SO_REUSEADDR, (void*)&opt, sizeof(int));
+
+  len = sizeof(struct sockaddr_in);
+  if ( getsockname(listen, (struct sockaddr *)&socket_addr, &len) == -1 ) {
+   return -1;
+  }
+  port = ROAR_NET2HOST16(socket_addr.sin_port);
+  ROAR_DBG("roar_simple_new_stream_obj(*): port=%i", port);
+#else
+  return -1;
+#endif
+ } else if ( type == ROAR_SOCKET_TYPE_DECNET ) {
+#ifdef ROAR_HAVE_LIBDNET
+  setsockopt(listen, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(int));
+#else
+  return -1;
+#endif
+ }
+
+ if ( roar_stream_new(s, rate, channels, bits, codec) == -1 ) {
+  return -1;
+ }
+
+ if ( roar_stream_connect(con, s, dir, mixer) == -1 ) {
+  return -1;
+ }
+
+ if ( type != ROAR_SOCKET_TYPE_UNIX ) {
+#ifdef ROAR_HAVE_SELECT
+  if ( roar_stream_connect_to_ask(con, s, type, file, port) != -1 ) {
+
+   FD_ZERO(&fds);
+   FD_SET(listen, &fds);
+
+   confh = roar_get_connection_fh(con);
+
+   if ( confh != -1 ) {
+    FD_SET(confh, &fds);
+   }
+
+   if ( select((confh > listen ? confh : listen) + 1, &fds, NULL, NULL, &timeout) < 1 ) {
+    close(listen);
+
+    // we don't need to check the content as we know it failed...
+    if ( roar_recv_message(con, &mes, NULL) == -1 )
+     return -1;
+
+    if ( roar_kick(con, ROAR_OT_STREAM, s->id) == -1 )
+     return -1;
+
+    return roar_simple_new_stream_attachexeced_obj(con, s, rate, channels, bits, codec, dir, mixer);
+   }
+
+   if ( FD_ISSET(listen, &fds) ) {
+    if ( (fh = accept(listen, NULL, NULL)) != -1 ) {
+     /* errr, do we need we any error handling here? */
+    }
+
+    if ( roar_recv_message(con, &mes, NULL) == -1 ) {
+     if ( fh != -1 )
+      close(fh);
+     fh = -1;
+    } else if ( mes.cmd != ROAR_CMD_OK ) {
+     if ( fh != -1 )
+      close(fh);
+     fh = -1;
+    }
+   } else {
+    // we don't need to check the content as we know it failed...
+    if ( roar_recv_message(con, &mes, NULL) == -1 ) {
+     close(listen);
+     return -1;
+    }
+
+    if ( mes.cmd != ROAR_CMD_OK ) {
+     close(listen);
+     if ( roar_kick(con, ROAR_OT_STREAM, s->id) == -1 )
+      return -1;
+
+     return roar_simple_new_stream_attachexeced_obj(con, s, rate, channels, bits, codec, dir, mixer);
+    } else { // seems like we have a positive reply. So we retry the listen socket:
+     FD_ZERO(&fds);
+     FD_SET(listen, &fds);
+     timeout.tv_sec = 0;
+     timeout.tv_usec = 128000L;
+     fh = -1;
+     if ( select(listen + 1, &fds, NULL, NULL, &timeout) > 0 ) {
+      if ( (fh = accept(listen, NULL, NULL)) == -1 ) {
+       close(listen);
+       if ( roar_kick(con, ROAR_OT_STREAM, s->id) == -1 )
+        return -1;
+
+       return roar_simple_new_stream_attachexeced_obj(con, s, rate, channels, bits, codec, dir, mixer);
+      }
+     }
+    }
+   }
+  }
+
+  close(listen);
+#else
+  return -1;
+#endif
+ } else { // this is type == ROAR_SOCKET_TYPE_UNIX
+#ifdef ROAR_HAVE_UNIX
+  if ( socketpair(AF_UNIX, SOCK_STREAM, 0, socks) == -1 ) {
+   roar_kick(con, ROAR_OT_STREAM, s->id); // we do not need to check for errors
+                                          // as we return -1 in both whys
+   return -1;
+  }
+
+  if ( roar_stream_passfh(con, s, socks[0]) == -1 ) {
+   roar_kick(con, ROAR_OT_STREAM, s->id); // we do not need to check for errors
+                                          // as we return -1 anyway.
+   close(socks[0]);
+   close(socks[1]);
+   return -1;
+  }
+
+  close(socks[0]);
+  fh = socks[1];
+#else
+  roar_kick(con, ROAR_OT_STREAM, s->id);
+  return -1;
+#endif
+ }
+
+ if ( fh != -1 ) {
+  if ( dir == ROAR_DIR_PLAY ) {
+   (void)ROAR_SHUTDOWN(fh, SHUT_RD);
+  } else if ( dir == ROAR_DIR_MONITOR || dir == ROAR_DIR_RECORD ) {
+   (void)ROAR_SHUTDOWN(fh, SHUT_WR);
+  }
+ }
+
+ s->fh = fh;
+
+ return fh;
+}
+
 int     roar_vio_simple_new_stream_obj (struct roar_vio_calls * calls,
                                         struct roar_connection * con,
@@ -175,11 +409,8 @@
   s = &stream;
 
- roar_libroar_nowarn();
- if ( (fh = roar_simple_new_stream_obj(con, s, rate, channels, bits, codec, dir, mixer)) == -1 ) {
-  roar_libroar_warn();
+ if ( (fh = _roar_simple_new_stream_obj(con, s, rate, channels, bits, codec, dir, mixer)) == -1 ) {
   ROAR_DBG("roar_vio_simple_new_stream_obj(*) = -1");
   return -1;
  }
- roar_libroar_warn();
 
  ROAR_DBG("roar_vio_simple_new_stream_obj(*): fh=%i", fh);
Index: libroar/vio_winsock.c
===================================================================
--- libroar/vio_winsock.c	(revision 5278)
+++ libroar/vio_winsock.c	(revision 5377)
@@ -37,10 +37,20 @@
 
 #ifdef ROAR_TARGET_WIN32
+
+static int _get_fh(struct roar_vio_calls * vio) {
+ int fh;
+
+ if ( roar_vio_ctl(vio, ROAR_VIO_CTL_GET_FH, &fh) == -1 )
+  return -1;
+
+ return fh;
+}
+
 ssize_t roar_vio_winsock_read    (struct roar_vio_calls * vio, void *buf, size_t count) {
- return recv(roar_vio_get_fh(vio), buf, count, 0);
+ return recv(_get_fh(vio), buf, count, 0);
 }
 
 ssize_t roar_vio_winsock_write   (struct roar_vio_calls * vio, void *buf, size_t count) {
- return send(roar_vio_get_fh(vio), buf, count, 0);
+ return send(_get_fh(vio), buf, count, 0);
 }
 
@@ -69,6 +79,6 @@
   case ROAR_VIO_CTL_GET_SELECT_READ_FH:
   case ROAR_VIO_CTL_GET_SELECT_WRITE_FH:
-    ROAR_DBG("roar_vio_winsock_ctl(vio=%p, cmd=ROAR_VIO_CTL_GET_SELECT_*FH(0x%.8x), data=%p) = 0 // fh=%i", vio, cmd, data, roar_vio_get_fh(vio));
-    *(int*)data = roar_vio_get_fh(vio);
+    ROAR_DBG("roar_vio_winsock_ctl(vio=%p, cmd=ROAR_VIO_CTL_GET_SELECT_*FH(0x%.8x), data=%p) = 0 // fh=%i", vio, cmd, data, _get_fh(vio));
+    *(int*)data = _get_fh(vio);
     return 0;
    break;
@@ -78,5 +88,5 @@
    break;
   case ROAR_VIO_CTL_ACCEPT:
-    tmp = accept(roar_vio_get_fh(vio), NULL, 0);
+    tmp = accept(_get_fh(vio), NULL, 0);
     if ( tmp == -1 )
      return -1;
@@ -116,5 +126,5 @@
     }
 
-    return shutdown(roar_vio_get_fh(vio), tmp);
+    return shutdown(_get_fh(vio), tmp);
    break;
  }
@@ -126,5 +136,5 @@
 int     roar_vio_winsock_close   (struct roar_vio_calls * vio) {
 
- closesocket(roar_vio_get_fh(vio));
+ closesocket(_get_fh(vio));
 
  return 0;
Index: roard/sources.c
===================================================================
--- roard/sources.c	(revision 5289)
+++ roard/sources.c	(revision 5377)
@@ -308,5 +308,4 @@
  vio = &(ROAR_STREAM_SERVER(s)->vio);
 
- //if ( roar_vio_open_file(vio, device, O_RDONLY, 0644) == -1 ) {
  if ( roar_vio_open_dstr(vio, device, &def, 1) == -1 ) {
   roar_vio_clear_calls(vio); // clear the VIO object again
Index: roard/streams.c
===================================================================
--- roard/streams.c	(revision 5374)
+++ roard/streams.c	(revision 5377)
@@ -2612,6 +2612,4 @@
  }
 
- //roar_vio_set_fh(&(stream->vio), ROAR_STREAM(stream)->fh);
-
  if ( stream->vio.read == NULL ) {
   roar_err_set(ROAR_ERROR_NOTSUP);
@@ -2662,9 +2660,4 @@
   return -1;
  }
-
-/*
- if ( roar_vio_get_fh(&(stream->vio)) == -1 && ROAR_STREAM(stream)->fh != -1 )
-  roar_vio_set_fh(&(stream->vio), ROAR_STREAM(stream)->fh);
-*/
 
 // ROAR_WARN("stream_vio_s_write(*): writing...");
