Index: include/libroar/vio.h
===================================================================
--- include/libroar/vio.h	(revision 5276)
+++ include/libroar/vio.h	(revision 5278)
@@ -43,20 +43,17 @@
 // sys io:
 
+typedef int32_t       roar_vio_ctl_t;
+typedef int_least64_t roar_off_t;
+
 struct roar_vio_calls {
- void * inst;
-/*
- ssize_t (*read) (int fd, void *buf, size_t count, void * inst);
- ssize_t (*write)(int fd, void *buf, size_t count, void * inst);
- off_t   (*lseek)(int fildes, off_t offset, int whence, void * inst);
-*/
- ssize_t (*read    )(struct roar_vio_calls * vio, void *buf, size_t count);
- ssize_t (*write   )(struct roar_vio_calls * vio, void *buf, size_t count);
- off_t   (*lseek   )(struct roar_vio_calls * vio, off_t offset, int whence);
-// int     (*nonblock)(struct roar_vio_calls * vio, int state);
- int     (*sync    )(struct roar_vio_calls * vio);
- int     (*ctl     )(struct roar_vio_calls * vio, int cmd, void * data);
- int     (*close   )(struct roar_vio_calls * vio);
- uint32_t flags;
- size_t   refc;
+ size_t           refc;
+ uint32_t         flags;
+ void            *inst;
+ ssize_t        (*read    )(struct roar_vio_calls * vio, void *buf, size_t count);
+ ssize_t        (*write   )(struct roar_vio_calls * vio, void *buf, size_t count);
+ roar_off_t     (*lseek   )(struct roar_vio_calls * vio, roar_off_t offset, int whence);
+ int            (*sync    )(struct roar_vio_calls * vio);
+ int            (*ctl     )(struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data);
+ int            (*close   )(struct roar_vio_calls * vio);
 };
 
@@ -72,8 +69,8 @@
 ssize_t roar_vio_read    (struct roar_vio_calls * vio, void *buf, size_t count) _LIBROAR_ATTR_USE_RESULT _LIBROAR_ATTR_NONNULL_ALL;
 ssize_t roar_vio_write   (struct roar_vio_calls * vio, void *buf, size_t count) _LIBROAR_ATTR_USE_RESULT _LIBROAR_ATTR_NONNULL_ALL;
-off_t   roar_vio_lseek   (struct roar_vio_calls * vio, off_t offset, int whence) _LIBROAR_ATTR_USE_RESULT _LIBROAR_ATTR_NONNULL_ALL;
+roar_off_t   roar_vio_lseek   (struct roar_vio_calls * vio, roar_off_t offset, int whence) _LIBROAR_ATTR_USE_RESULT _LIBROAR_ATTR_NONNULL_ALL;
 int     roar_vio_nonblock(struct roar_vio_calls * vio, int state) _LIBROAR_ATTR_USE_RESULT _LIBROAR_ATTR_NONNULL_ALL;
 int     roar_vio_sync    (struct roar_vio_calls * vio) _LIBROAR_ATTR_NONNULL_ALL;
-int     roar_vio_ctl     (struct roar_vio_calls * vio, int cmd, void * data) _LIBROAR_ATTR_USE_RESULT _LIBROAR_ATTR_NONNULL(1);
+int     roar_vio_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) _LIBROAR_ATTR_USE_RESULT _LIBROAR_ATTR_NONNULL(1);
 int     roar_vio_close   (struct roar_vio_calls * vio) _LIBROAR_ATTR_NONNULL_ALL;
 
@@ -103,7 +100,7 @@
 ssize_t roar_vio_basic_read    (struct roar_vio_calls * vio, void *buf, size_t count);
 ssize_t roar_vio_basic_write   (struct roar_vio_calls * vio, void *buf, size_t count);
-off_t   roar_vio_basic_lseek   (struct roar_vio_calls * vio, off_t offset, int whence);
+roar_off_t   roar_vio_basic_lseek   (struct roar_vio_calls * vio, roar_off_t offset, int whence);
 int     roar_vio_basic_sync    (struct roar_vio_calls * vio);
-int     roar_vio_basic_ctl     (struct roar_vio_calls * vio, int cmd, void * data);
+int     roar_vio_basic_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data);
 int     roar_vio_basic_close   (struct roar_vio_calls * vio);
 
@@ -118,7 +115,7 @@
 ssize_t roar_vio_pass_read    (struct roar_vio_calls * vio, void *buf, size_t count);
 ssize_t roar_vio_pass_write   (struct roar_vio_calls * vio, void *buf, size_t count);
-off_t   roar_vio_pass_lseek   (struct roar_vio_calls * vio, off_t offset, int whence);
+roar_off_t   roar_vio_pass_lseek   (struct roar_vio_calls * vio, roar_off_t offset, int whence);
 int     roar_vio_pass_sync    (struct roar_vio_calls * vio);
-int     roar_vio_pass_ctl     (struct roar_vio_calls * vio, int cmd, void * data);
+int     roar_vio_pass_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data);
 int     roar_vio_pass_close   (struct roar_vio_calls * vio);
 
@@ -128,5 +125,5 @@
 ssize_t roar_vio_re_read (struct roar_vio_calls * vio, void *buf, size_t count);
 ssize_t roar_vio_re_write(struct roar_vio_calls * vio, void *buf, size_t count);
-off_t   roar_vio_re_lseek(struct roar_vio_calls * vio, off_t offset, int whence);
+roar_off_t   roar_vio_re_lseek(struct roar_vio_calls * vio, roar_off_t offset, int whence);
 
 #endif
Index: include/libroar/vio_bio.h
===================================================================
--- include/libroar/vio_bio.h	(revision 4708)
+++ include/libroar/vio_bio.h	(revision 5278)
@@ -49,6 +49,5 @@
 ssize_t roar_vio_bio_read    (struct roar_vio_calls * vio, void *buf, size_t count);
 ssize_t roar_vio_bio_write   (struct roar_vio_calls * vio, void *buf, size_t count);
-off_t   roar_vio_bio_lseek   (struct roar_vio_calls * vio, off_t offset, int whence);
-int     roar_vio_bio_nonblock(struct roar_vio_calls * vio, int state);
+roar_off_t   roar_vio_bio_lseek   (struct roar_vio_calls * vio, roar_off_t offset, int whence);
 int     roar_vio_bio_sync    (struct roar_vio_calls * vio);
 int     roar_vio_bio_close   (struct roar_vio_calls * vio);
Index: include/libroar/vio_buffer.h
===================================================================
--- include/libroar/vio_buffer.h	(revision 4708)
+++ include/libroar/vio_buffer.h	(revision 5278)
@@ -58,8 +58,7 @@
 ssize_t roar_vio_buffer_read    (struct roar_vio_calls * vio, void *buf, size_t count);
 ssize_t roar_vio_buffer_write   (struct roar_vio_calls * vio, void *buf, size_t count);
-off_t   roar_vio_buffer_lseek   (struct roar_vio_calls * vio, off_t offset, int whence);
-int     roar_vio_buffer_nonblock(struct roar_vio_calls * vio, int state);
+roar_off_t   roar_vio_buffer_lseek   (struct roar_vio_calls * vio, roar_off_t offset, int whence);
 int     roar_vio_buffer_sync    (struct roar_vio_calls * vio);
-int     roar_vio_buffer_ctl     (struct roar_vio_calls * vio, int cmd, void * data);
+int     roar_vio_buffer_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data);
 int     roar_vio_buffer_close   (struct roar_vio_calls * vio);
 
Index: include/libroar/vio_buffer_store.h
===================================================================
--- include/libroar/vio_buffer_store.h	(revision 4708)
+++ include/libroar/vio_buffer_store.h	(revision 5278)
@@ -46,8 +46,7 @@
 ssize_t roar_vio_buffer_store_read    (struct roar_vio_calls * vio, void *buf, size_t count);
 ssize_t roar_vio_buffer_store_write   (struct roar_vio_calls * vio, void *buf, size_t count);
-off_t   roar_vio_buffer_store_lseek   (struct roar_vio_calls * vio, off_t offset, int whence);
-int     roar_vio_buffer_store_nonblock(struct roar_vio_calls * vio, int state);
+roar_off_t   roar_vio_buffer_store_lseek   (struct roar_vio_calls * vio, roar_off_t offset, int whence);
 int     roar_vio_buffer_store_sync    (struct roar_vio_calls * vio);
-int     roar_vio_buffer_store_ctl     (struct roar_vio_calls * vio, int cmd, void * data);
+int     roar_vio_buffer_store_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data);
 int     roar_vio_buffer_store_close   (struct roar_vio_calls * vio);
 
Index: include/libroar/vio_cmd.h
===================================================================
--- include/libroar/vio_cmd.h	(revision 4708)
+++ include/libroar/vio_cmd.h	(revision 5278)
@@ -96,19 +96,6 @@
 ssize_t roar_vio_cmd_read    (struct roar_vio_calls * vio, void *buf, size_t count);
 ssize_t roar_vio_cmd_write   (struct roar_vio_calls * vio, void *buf, size_t count);
-int     roar_vio_cmd_nonblock(struct roar_vio_calls * vio, int state);
 int     roar_vio_cmd_sync    (struct roar_vio_calls * vio);
-int     roar_vio_cmd_ctl     (struct roar_vio_calls * vio, int cmd, void * data);
-
-/*
-// pass
-int     roar_vio_open_pass    (struct roar_vio_calls * calls, struct roar_vio_calls * dst);
-ssize_t roar_vio_pass_read    (struct roar_vio_calls * vio, void *buf, size_t count);
-ssize_t roar_vio_pass_write   (struct roar_vio_calls * vio, void *buf, size_t count);
-off_t   roar_vio_pass_lseek   (struct roar_vio_calls * vio, off_t offset, int whence);
-int     roar_vio_pass_nonblock(struct roar_vio_calls * vio, int state);
-int     roar_vio_pass_sync    (struct roar_vio_calls * vio);
-int     roar_vio_pass_ctl     (struct roar_vio_calls * vio, int cmd, void * data);
-int     roar_vio_pass_close   (struct roar_vio_calls * vio);
-*/
+int     roar_vio_cmd_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data);
 
 // MISC:
Index: include/libroar/vio_jumbo.h
===================================================================
--- include/libroar/vio_jumbo.h	(revision 4708)
+++ include/libroar/vio_jumbo.h	(revision 5278)
@@ -49,8 +49,7 @@
 ssize_t roar_vio_jumbo_read    (struct roar_vio_calls * vio, void *buf, size_t count);
 ssize_t roar_vio_jumbo_write   (struct roar_vio_calls * vio, void *buf, size_t count);
-off_t   roar_vio_jumbo_lseek   (struct roar_vio_calls * vio, off_t offset, int whence);
-int     roar_vio_jumbo_nonblock(struct roar_vio_calls * vio, int state);
+roar_off_t   roar_vio_jumbo_lseek   (struct roar_vio_calls * vio, roar_off_t offset, int whence);
 int     roar_vio_jumbo_sync    (struct roar_vio_calls * vio);
-int     roar_vio_jumbo_ctl     (struct roar_vio_calls * vio, int cmd, void * data);
+int     roar_vio_jumbo_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data);
 int     roar_vio_jumbo_close   (struct roar_vio_calls * vio);
 
Index: include/libroar/vio_magic.h
===================================================================
--- include/libroar/vio_magic.h	(revision 4708)
+++ include/libroar/vio_magic.h	(revision 5278)
@@ -39,4 +39,5 @@
 #include "libroar.h"
 
+#if 0
 struct roar_vio_magic {
  struct roar_buffer * inp;
@@ -45,10 +46,5 @@
 
 int     roar_vio_open_magic    (struct roar_vio_calls * calls, struct roar_vio_calls * dst, int * codec);
-ssize_t roar_vio_magic_read    (struct roar_vio_calls * vio, void *buf, size_t count);
-ssize_t roar_vio_magic_write   (struct roar_vio_calls * vio, void *buf, size_t count);
-off_t   roar_vio_magic_lseek   (struct roar_vio_calls * vio, off_t offset, int whence);
-int     roar_vio_magic_nonblock(struct roar_vio_calls * vio, int state);
-int     roar_vio_magic_sync    (struct roar_vio_calls * vio);
-int     roar_vio_magic_close   (struct roar_vio_calls * vio);
+#endif
 #endif
 
Index: include/libroar/vio_pipe.h
===================================================================
--- include/libroar/vio_pipe.h	(revision 4708)
+++ include/libroar/vio_pipe.h	(revision 5278)
@@ -67,7 +67,6 @@
 ssize_t roar_vio_pipe_read    (struct roar_vio_calls * vio, void *buf, size_t count);
 ssize_t roar_vio_pipe_write   (struct roar_vio_calls * vio, void *buf, size_t count);
-int     roar_vio_pipe_nonblock(struct roar_vio_calls * vio, int state);
 int     roar_vio_pipe_sync    (struct roar_vio_calls * vio);
-int     roar_vio_pipe_ctl     (struct roar_vio_calls * vio, int cmd, void * data);
+int     roar_vio_pipe_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data);
 int     roar_vio_pipe_close   (struct roar_vio_calls * vio);
 
Index: include/libroar/vio_proto.h
===================================================================
--- include/libroar/vio_proto.h	(revision 5254)
+++ include/libroar/vio_proto.h	(revision 5278)
@@ -67,8 +67,6 @@
 ssize_t roar_vio_proto_read    (struct roar_vio_calls * vio, void *buf, size_t count);
 ssize_t roar_vio_proto_write   (struct roar_vio_calls * vio, void *buf, size_t count);
-off_t   roar_vio_proto_lseek   (struct roar_vio_calls * vio, off_t offset, int whence);
-int     roar_vio_proto_nonblock(struct roar_vio_calls * vio, int state);
 int     roar_vio_proto_sync    (struct roar_vio_calls * vio);
-int     roar_vio_proto_ctl     (struct roar_vio_calls * vio, int cmd, void * data);
+int     roar_vio_proto_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data);
 int     roar_vio_proto_close   (struct roar_vio_calls * vio);
 
Index: include/libroar/vio_rtp.h
===================================================================
--- include/libroar/vio_rtp.h	(revision 4708)
+++ include/libroar/vio_rtp.h	(revision 5278)
@@ -122,8 +122,6 @@
 ssize_t roar_vio_rtp_read    (struct roar_vio_calls * vio, void *buf, size_t count);
 ssize_t roar_vio_rtp_write   (struct roar_vio_calls * vio, void *buf, size_t count);
-off_t   roar_vio_rtp_lseek   (struct roar_vio_calls * vio, off_t offset, int whence);
-int     roar_vio_rtp_nonblock(struct roar_vio_calls * vio, int state);
 int     roar_vio_rtp_sync    (struct roar_vio_calls * vio);
-int     roar_vio_rtp_ctl     (struct roar_vio_calls * vio, int cmd, void * data);
+int     roar_vio_rtp_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data);
 int     roar_vio_rtp_close   (struct roar_vio_calls * vio);
 
Index: include/libroar/vio_stack.h
===================================================================
--- include/libroar/vio_stack.h	(revision 4975)
+++ include/libroar/vio_stack.h	(revision 5278)
@@ -57,8 +57,7 @@
 ssize_t roar_vio_stack_read    (struct roar_vio_calls * vio, void *buf, size_t count);
 ssize_t roar_vio_stack_write   (struct roar_vio_calls * vio, void *buf, size_t count);
-off_t   roar_vio_stack_lseek   (struct roar_vio_calls * vio, off_t offset, int whence);
-int     roar_vio_stack_nonblock(struct roar_vio_calls * vio, int state);
+roar_off_t   roar_vio_stack_lseek   (struct roar_vio_calls * vio, roar_off_t offset, int whence);
 int     roar_vio_stack_sync    (struct roar_vio_calls * vio);
-int     roar_vio_stack_ctl     (struct roar_vio_calls * vio, int cmd, void * data);
+int     roar_vio_stack_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data);
 int     roar_vio_stack_close   (struct roar_vio_calls * vio);
 
Index: include/libroar/vio_stdio.h
===================================================================
--- include/libroar/vio_stdio.h	(revision 5088)
+++ include/libroar/vio_stdio.h	(revision 5278)
@@ -59,7 +59,7 @@
 ssize_t roar_vio_stdio_read    (struct roar_vio_calls * vio, void *buf, size_t count);
 ssize_t roar_vio_stdio_write   (struct roar_vio_calls * vio, void *buf, size_t count);
-off_t   roar_vio_stdio_lseek   (struct roar_vio_calls * vio, off_t offset, int whence);
+roar_off_t   roar_vio_stdio_lseek   (struct roar_vio_calls * vio, roar_off_t offset, int whence);
 int     roar_vio_stdio_sync    (struct roar_vio_calls * vio);
-int     roar_vio_stdio_ctl     (struct roar_vio_calls * vio, int cmd, void * data);
+int     roar_vio_stdio_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data);
 int     roar_vio_stdio_close   (struct roar_vio_calls * vio);
 
Index: include/libroar/vio_winsock.h
===================================================================
--- include/libroar/vio_winsock.h	(revision 5276)
+++ include/libroar/vio_winsock.h	(revision 5278)
@@ -43,5 +43,5 @@
 ssize_t roar_vio_winsock_write   (struct roar_vio_calls * vio, void *buf, size_t count);
 int     roar_vio_winsock_sync    (struct roar_vio_calls * vio);
-int     roar_vio_winsock_ctl     (struct roar_vio_calls * vio, int cmd, void * data);
+int     roar_vio_winsock_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data);
 int     roar_vio_winsock_close   (struct roar_vio_calls * vio);
 #endif
Index: include/libroardsp/vio_transcode.h
===================================================================
--- include/libroardsp/vio_transcode.h	(revision 4708)
+++ include/libroardsp/vio_transcode.h	(revision 5278)
@@ -41,8 +41,5 @@
 int     roar_vio_open_xcode    (struct roar_vio_calls * calls, int encoder, struct roar_audio_info * info, struct roar_vio_calls * dst);
 ssize_t roar_vio_xcode_proc    (struct roar_vio_calls * vio, void *buf, size_t count);
-off_t   roar_vio_xcode_lseek   (struct roar_vio_calls * vio, off_t offset, int whence);
-int     roar_vio_xcode_nonblock(struct roar_vio_calls * vio, int state);
 int     roar_vio_xcode_sync    (struct roar_vio_calls * vio);
-int     roar_vio_xcode_ctl     (struct roar_vio_calls * vio, int cmd, void * data);
 int     roar_vio_xcode_close   (struct roar_vio_calls * vio);
 
@@ -50,8 +47,5 @@
 ssize_t roar_vio_bixcode_read    (struct roar_vio_calls * vio, void *buf, size_t count);
 ssize_t roar_vio_bixcode_write   (struct roar_vio_calls * vio, void *buf, size_t count);
-off_t   roar_vio_bixcode_lseek   (struct roar_vio_calls * vio, off_t offset, int whence);
-int     roar_vio_bixcode_nonblock(struct roar_vio_calls * vio, int state);
 int     roar_vio_bixcode_sync    (struct roar_vio_calls * vio);
-int     roar_vio_bixcode_ctl     (struct roar_vio_calls * vio, int cmd, void * data);
 int     roar_vio_bixcode_close   (struct roar_vio_calls * vio);
 
Index: libroar/vio.c
===================================================================
--- libroar/vio.c	(revision 5276)
+++ libroar/vio.c	(revision 5278)
@@ -56,10 +56,4 @@
  memset((void*)calls, 0, sizeof(struct roar_vio_calls));
 
-/*
- calls->read  = (ssize_t (*)(int fd, void *buf, size_t count,      void * inst))read;
- calls->write = (ssize_t (*)(int fd, void *buf, size_t count,      void * inst))write;
- calls->lseek = (off_t   (*)(int fildes, off_t offset, int whence, void * inst))lseek;
-*/
-
  calls->read     = roar_vio_basic_read;
  calls->write    = roar_vio_basic_write;
@@ -155,8 +149,8 @@
 }
 
-off_t   roar_vio_lseek(struct roar_vio_calls * vio, off_t offset, int whence) {
- off_t ret;
-
- ROAR_DBG("roar_vio_lseek(vio=%p, offset=%u, whence=%i) = ?", vio, (unsigned int)offset, whence);
+roar_off_t   roar_vio_lseek(struct roar_vio_calls * vio, roar_off_t offset, int whence) {
+ roar_off_t ret;
+
+ ROAR_DBG("roar_vio_lseek(vio=%p, offset=%li, whence=%i) = ?", vio, (long int)offset, whence);
 
  if ( vio == NULL ) {
@@ -210,5 +204,5 @@
 }
 
-int     roar_vio_ctl     (struct roar_vio_calls * vio, int cmd, void * data) {
+int     roar_vio_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  int ret;
 
@@ -394,5 +388,5 @@
 }
 
-off_t   roar_vio_basic_lseek(struct roar_vio_calls * vio, off_t offset, int whence) {
+roar_off_t   roar_vio_basic_lseek(struct roar_vio_calls * vio, roar_off_t offset, int whence) {
 #ifdef _CAN_OPERATE
  return lseek(roar_vio_get_fh(vio), offset, whence);
@@ -411,5 +405,5 @@
 }
 
-int     roar_vio_basic_ctl     (struct roar_vio_calls * vio, int cmd, void * data) {
+int     roar_vio_basic_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
 #ifdef ROAR_HAVE_H_SYS_IOCTL
  struct roar_vio_sysio_ioctl * sysioctl;
@@ -715,5 +709,5 @@
 }
 
-off_t   roar_vio_pass_lseek(struct roar_vio_calls * vio, off_t offset, int whence) {
+roar_off_t   roar_vio_pass_lseek(struct roar_vio_calls * vio, roar_off_t offset, int whence) {
  return roar_vio_lseek((struct roar_vio_calls *) vio->inst, offset, whence);
 }
@@ -723,5 +717,5 @@
 }
 
-int     roar_vio_pass_ctl     (struct roar_vio_calls * vio, int cmd, void * data) {
+int     roar_vio_pass_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  if (vio == NULL) {
   roar_err_set(ROAR_ERROR_FAULT);
@@ -841,5 +835,5 @@
 
 // TODO: we should do a some more intelgent thing here.
-off_t   roar_vio_re_lseek(struct roar_vio_calls * vio, off_t offset, int whence) {
+roar_off_t   roar_vio_re_lseek(struct roar_vio_calls * vio, roar_off_t offset, int whence) {
  return roar_vio_lseek((struct roar_vio_calls *) vio->inst, offset, whence);
 }
Index: libroar/vio_bio.c
===================================================================
--- libroar/vio_bio.c	(revision 4708)
+++ libroar/vio_bio.c	(revision 5278)
@@ -46,5 +46,4 @@
  calls->write    = roar_vio_bio_write;
  calls->lseek    = roar_vio_bio_lseek;
- calls->nonblock = roar_vio_bio_nonblock;
  calls->sync     = roar_vio_bio_sync;
  calls->close    = roar_vio_bio_close;
@@ -82,11 +81,8 @@
 }
 
-off_t   roar_vio_bio_lseek   (struct roar_vio_calls * vio, off_t offset, int whence) {
+roar_off_t   roar_vio_bio_lseek   (struct roar_vio_calls * vio, roar_off_t offset, int whence) {
  return -1;
 }
 
-int     roar_vio_bio_nonblock(struct roar_vio_calls * vio, int state) {
- return -1;
-}
 int     roar_vio_bio_sync    (struct roar_vio_calls * vio) {
  return -1;
Index: libroar/vio_buffer.c
===================================================================
--- libroar/vio_buffer.c	(revision 5276)
+++ libroar/vio_buffer.c	(revision 5278)
@@ -146,5 +146,5 @@
  struct roar_vio_buffer * self = vio->inst;
  struct roar_vio_calls  * backend;
- off_t dst = 0;
+ roar_off_t dst = 0;
 
  if ( self->use_re ) {
@@ -182,5 +182,5 @@
 
  // do the seek:
- if ( roar_vio_lseek(backend, dst, SEEK_CUR) == (off_t)-1 )
+ if ( roar_vio_lseek(backend, dst, SEEK_CUR) == (roar_off_t)-1 )
   return -1;
 
@@ -207,9 +207,9 @@
 }
 
-off_t   roar_vio_buffer_lseek   (struct roar_vio_calls * vio, off_t offset, int whence) {
+roar_off_t   roar_vio_buffer_lseek   (struct roar_vio_calls * vio, roar_off_t offset, int whence) {
  struct roar_vio_buffer * self = vio->inst;
  size_t newoff;
- off_t  ret;
- off_t  invoff;
+ roar_off_t  ret;
+ roar_off_t  invoff;
 
  // in-memory seeking is only supported for SEEK_CUR:
@@ -286,5 +286,5 @@
  }
 
- if (ret != (off_t)-1)
+ if (ret != (roar_off_t)-1)
   self->abspos = ret;
 
@@ -292,5 +292,5 @@
 }
 
-int     roar_vio_buffer_ctl     (struct roar_vio_calls * vio, int cmd, void * data) {
+int     roar_vio_buffer_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  struct roar_vio_buffer * self;
 
Index: libroar/vio_buffer_store.c
===================================================================
--- libroar/vio_buffer_store.c	(revision 5276)
+++ libroar/vio_buffer_store.c	(revision 5278)
@@ -132,7 +132,7 @@
 }
 
-off_t   roar_vio_buffer_store_lseek   (struct roar_vio_calls * vio, off_t offset, int whence) {
+roar_off_t   roar_vio_buffer_store_lseek   (struct roar_vio_calls * vio, roar_off_t offset, int whence) {
  // TODO: implement support to seek forward as wide as the buffer allows us to seek.
- return (off_t)-1;
+ return (roar_off_t)-1;
 }
 
@@ -141,5 +141,5 @@
 }
 
-int     roar_vio_buffer_store_ctl     (struct roar_vio_calls * vio, int cmd, void * data) {
+int     roar_vio_buffer_store_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  if (vio == NULL || cmd == -1)
   return -1;
Index: libroar/vio_cmd.c
===================================================================
--- libroar/vio_cmd.c	(revision 5276)
+++ libroar/vio_cmd.c	(revision 5278)
@@ -251,5 +251,4 @@
  calls->read     = roar_vio_2popen_read;
  calls->write    = roar_vio_2popen_write;
- calls->nonblock = roar_vio_2popen_nonblock;
  calls->sync     = roar_vio_2popen_sync;
  calls->ctl      = roar_vio_2popen_ctl;
@@ -536,5 +535,5 @@
 }
 
-int     roar_vio_cmd_ctl     (struct roar_vio_calls * vio, int cmd, void * data) {
+int     roar_vio_cmd_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  struct roar_vio_cmd_state * state = (struct roar_vio_cmd_state *)vio->inst;
  char buf[1];
Index: libroar/vio_jumbo.c
===================================================================
--- libroar/vio_jumbo.c	(revision 5276)
+++ libroar/vio_jumbo.c	(revision 5278)
@@ -120,9 +120,9 @@
 }
 
-off_t   roar_vio_jumbo_lseek   (struct roar_vio_calls * vio, off_t offset, int whence) {
+roar_off_t   roar_vio_jumbo_lseek   (struct roar_vio_calls * vio, roar_off_t offset, int whence) {
  struct roar_vio_jumbo * self = vio->inst;
 
  if ( roar_vio_jumbo_sync(vio) == -1 )
-  return (off_t) -1;
+  return (roar_off_t) -1;
 
  return roar_vio_lseek(self->backend, offset, whence);
@@ -148,5 +148,5 @@
 }
 
-int     roar_vio_jumbo_ctl     (struct roar_vio_calls * vio, int cmd, void * data) {
+int     roar_vio_jumbo_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  struct roar_vio_jumbo * self = vio->inst;
 
Index: libroar/vio_magic.c
===================================================================
--- libroar/vio_magic.c	(revision 4708)
+++ libroar/vio_magic.c	(revision 5278)
@@ -36,8 +36,9 @@
 #include "libroar.h"
 
-int     roar_vio_open_magic    (struct roar_vio_calls * calls, struct roar_vio_calls * dst, int * codec);
-int     roar_vio_magic_close   (struct roar_vio_calls * vio);
+#if 0
 
-ssize_t roar_vio_magic_read    (struct roar_vio_calls * vio, void *buf, size_t count) {
+static int     roar_vio_magic_close   (struct roar_vio_calls * vio);
+
+static ssize_t roar_vio_magic_read    (struct roar_vio_calls * vio, void *buf, size_t count) {
  struct roar_vio_magic * self = (struct roar_vio_magic *)(vio->inst);
  struct roar_buffer    * inp;
@@ -75,5 +76,5 @@
 }
 
-ssize_t roar_vio_magic_write   (struct roar_vio_calls * vio, void *buf, size_t count) {
+static ssize_t roar_vio_magic_write   (struct roar_vio_calls * vio, void *buf, size_t count) {
  struct roar_vio_magic * self = (struct roar_vio_magic *)(vio->inst);
  void * calls;
@@ -88,5 +89,5 @@
 }
 
-off_t   roar_vio_magic_lseek   (struct roar_vio_calls * vio, off_t offset, int whence) {
+static roar_off_t   roar_vio_magic_lseek   (struct roar_vio_calls * vio, roar_off_t offset, int whence) {
  struct roar_vio_magic * self = (struct roar_vio_magic *)(vio->inst);
  void * calls;
@@ -101,18 +102,5 @@
 }
 
-int     roar_vio_magic_nonblock(struct roar_vio_calls * vio, int state) {
- struct roar_vio_magic * self = (struct roar_vio_magic *)(vio->inst);
- void * calls;
-
- if (self == NULL)
-  return -1;
-
- if ( roar_stack_get_cur(&(self->vios), &calls) == -1 )
-  return -1;
-
- return roar_vio_nonblock((struct roar_vio_calls*)calls, state);
-}
-
-int     roar_vio_magic_sync    (struct roar_vio_calls * vio) {
+static int     roar_vio_magic_sync    (struct roar_vio_calls * vio) {
  struct roar_vio_magic * self = (struct roar_vio_magic *)(vio->inst);
  void * calls;
@@ -127,3 +115,7 @@
 }
 
+int     roar_vio_open_magic    (struct roar_vio_calls * calls, struct roar_vio_calls * dst, int * codec);
+
+#endif
+
 //ll
Index: libroar/vio_misc.c
===================================================================
--- libroar/vio_misc.c	(revision 5276)
+++ libroar/vio_misc.c	(revision 5278)
@@ -54,5 +54,5 @@
 }
 
-static off_t   roar_vio_misc_lseek   (struct roar_vio_calls * vio, off_t offset, int whence) {
+static roar_off_t   roar_vio_misc_lseek   (struct roar_vio_calls * vio, roar_off_t offset, int whence) {
  (void)vio, (void)offset, (void)whence;
  return 0;
@@ -64,5 +64,5 @@
 }
 
-static int     roar_vio_misc_ctl     (struct roar_vio_calls * vio, int cmd, void * data) {
+static int     roar_vio_misc_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  struct roar_vio_misc * self = vio->inst;
 
Index: libroar/vio_pipe.c
===================================================================
--- libroar/vio_pipe.c	(revision 5276)
+++ libroar/vio_pipe.c	(revision 5278)
@@ -195,5 +195,5 @@
 }
 
-int     roar_vio_pipe_ctl     (struct roar_vio_calls * vio, int cmd, void * data) {
+int     roar_vio_pipe_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  struct roar_vio_pipe * self;
 
Index: libroar/vio_proto.c
===================================================================
--- libroar/vio_proto.c	(revision 5276)
+++ libroar/vio_proto.c	(revision 5278)
@@ -120,5 +120,4 @@
  calls->read     = roar_vio_proto_read;
  calls->write    = roar_vio_proto_write;
-// calls->lseek    = roar_vio_proto_lseek; // TODO: this is currently not supported
  calls->sync     = roar_vio_proto_sync;
  calls->ctl      = roar_vio_proto_ctl;
@@ -229,7 +228,4 @@
 }
 
-// TODO: this is currently not implemented as this is hard to implement with buffers:
-off_t   roar_vio_proto_lseek   (struct roar_vio_calls * vio, off_t offset, int whence);
-
 int     roar_vio_proto_sync    (struct roar_vio_calls * vio) {
  struct roar_vio_proto * self = vio->inst;
@@ -238,5 +234,5 @@
 }
 
-int     roar_vio_proto_ctl     (struct roar_vio_calls * vio, int cmd, void * data) {
+int     roar_vio_proto_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  struct roar_vio_proto * self = vio->inst;
 
Index: libroar/vio_rtp.c
===================================================================
--- libroar/vio_rtp.c	(revision 5276)
+++ libroar/vio_rtp.c	(revision 5278)
@@ -114,5 +114,4 @@
  calls->read               = roar_vio_rtp_read;
  calls->write              = roar_vio_rtp_write;
-// calls->lseek              = roar_vio_rtp_lseek;
  calls->sync               = roar_vio_rtp_sync;
  calls->ctl                = roar_vio_rtp_ctl;
@@ -313,6 +312,4 @@
 }
 
-off_t   roar_vio_rtp_lseek   (struct roar_vio_calls * vio, off_t offset, int whence);
-
 int     roar_vio_rtp_sync    (struct roar_vio_calls * vio) {
  struct roar_rtp_inst * self = vio->inst;
@@ -323,5 +320,5 @@
 }
 
-int     roar_vio_rtp_ctl     (struct roar_vio_calls * vio, int cmd, void * data) {
+int     roar_vio_rtp_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  struct roar_rtp_inst * self = vio->inst;
  struct roar_stream          * s    = NULL;
Index: libroar/vio_stack.c
===================================================================
--- libroar/vio_stack.c	(revision 5276)
+++ libroar/vio_stack.c	(revision 5278)
@@ -116,5 +116,5 @@
 }
 
-int     roar_vio_stack_ctl     (struct roar_vio_calls * vio, int cmd, void * data) {
+int     roar_vio_stack_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  if (vio == NULL || cmd == -1)
   return -1;
@@ -170,5 +170,5 @@
 }
 
-off_t   roar_vio_stack_lseek   (struct roar_vio_calls * vio, off_t offset, int whence) {
+roar_off_t   roar_vio_stack_lseek   (struct roar_vio_calls * vio, roar_off_t offset, int whence) {
  if ( vio == NULL )
   return -1;
Index: libroar/vio_stdio.c
===================================================================
--- libroar/vio_stdio.c	(revision 5270)
+++ libroar/vio_stdio.c	(revision 5278)
@@ -131,5 +131,5 @@
 }
 
-off_t   roar_vio_stdio_lseek   (struct roar_vio_calls * vio, off_t offset, int whence) {
+roar_off_t   roar_vio_stdio_lseek   (struct roar_vio_calls * vio, roar_off_t offset, int whence) {
 #if defined(ROAR_HAVE_FSEEK) && defined(ROAR_HAVE_FTELL)
  if ( fseek((FILE*)(vio->inst), offset, whence) == -1 )
@@ -138,5 +138,5 @@
  return ftell((FILE*)(vio->inst));
 #else
- return (off_t)-1;
+ return (roar_off_t)-1;
 #endif
 }
@@ -146,5 +146,5 @@
 }
 
-int     roar_vio_stdio_ctl     (struct roar_vio_calls * vio, int cmd, void * data) {
+int     roar_vio_stdio_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
 
  if ( vio == NULL || cmd == -1 )
Index: libroar/vio_stream.c
===================================================================
--- libroar/vio_stream.c	(revision 5276)
+++ libroar/vio_stream.c	(revision 5278)
@@ -44,5 +44,5 @@
 }
 
-static off_t   _vio_stream_lseek   (struct roar_vio_calls * vio, off_t offset, int whence) {
+static roar_off_t   _vio_stream_lseek   (struct roar_vio_calls * vio, roar_off_t offset, int whence) {
  return roar_vio_lseek(roar_get_connection_vio2(vio->inst), offset, whence);
 }
@@ -50,5 +50,5 @@
  return roar_vio_sync(roar_get_connection_vio2(vio->inst));
 }
-static int     _vio_stream_ctl     (struct roar_vio_calls * vio, int cmd, void * data) {
+static int     _vio_stream_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  if (vio == NULL) {
   roar_err_set(ROAR_ERROR_FAULT);
Index: libroar/vio_string.c
===================================================================
--- libroar/vio_string.c	(revision 4708)
+++ libroar/vio_string.c	(revision 5278)
@@ -67,5 +67,5 @@
  char    cur;
  char    buf[1024];
- off_t   offs;
+ roar_off_t   offs;
  char  * eol;
 
@@ -79,5 +79,5 @@
  size -= 1;
 
- if ( (offs = roar_vio_lseek(vio, 0, SEEK_CUR)) == (off_t)-1 ) {
+ if ( (offs = roar_vio_lseek(vio, 0, SEEK_CUR)) == (roar_off_t)-1 ) {
   // need to use the one byte at a time methode
   while ( have < size ) {
Index: libroar/vio_winsock.c
===================================================================
--- libroar/vio_winsock.c	(revision 5276)
+++ libroar/vio_winsock.c	(revision 5278)
@@ -49,5 +49,5 @@
 }
 
-int     roar_vio_winsock_ctl     (struct roar_vio_calls * vio, int cmd, void * data) {
+int     roar_vio_winsock_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  int tmp;
  int s_r = 0, s_w = 0;
Index: libroar/vio_zlib.c
===================================================================
--- libroar/vio_zlib.c	(revision 5276)
+++ libroar/vio_zlib.c	(revision 5278)
@@ -429,8 +429,8 @@
 }
 
-static off_t   roar_vio_zlib_lseek   (struct roar_vio_calls * vio, off_t offset, int whence) {
+static roar_off_t   roar_vio_zlib_lseek   (struct roar_vio_calls * vio, roar_off_t offset, int whence) {
  (void)vio, (void)offset, (void)whence;
  roar_err_set(ROAR_ERROR_NOSYS);
- return (off_t)-1;
+ return (roar_off_t)-1;
 }
 
@@ -447,5 +447,5 @@
 }
 
-static int     roar_vio_zlib_ctl     (struct roar_vio_calls * vio, int cmd, void * data) {
+static int     roar_vio_zlib_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  struct roar_vio_gzip * self;
 
Index: libroardsp/vio_transcode.c
===================================================================
--- libroardsp/vio_transcode.c	(revision 5270)
+++ libroardsp/vio_transcode.c	(revision 5278)
@@ -80,8 +80,5 @@
 }
 
-off_t   roar_vio_xcode_lseek   (struct roar_vio_calls * vio, off_t offset, int whence);
-int     roar_vio_xcode_nonblock(struct roar_vio_calls * vio, int state);
 int     roar_vio_xcode_sync    (struct roar_vio_calls * vio);
-int     roar_vio_xcode_ctl     (struct roar_vio_calls * vio, int cmd, void * data);
 
 int     roar_vio_xcode_close   (struct roar_vio_calls * vio) {
@@ -151,8 +148,5 @@
 }
 
-off_t   roar_vio_bixcode_lseek   (struct roar_vio_calls * vio, off_t offset, int whence);
-int     roar_vio_bixcode_nonblock(struct roar_vio_calls * vio, int state);
 int     roar_vio_bixcode_sync    (struct roar_vio_calls * vio);
-int     roar_vio_bixcode_ctl     (struct roar_vio_calls * vio, int cmd, void * data);
 
 int     roar_vio_bixcode_close   (struct roar_vio_calls * vio) {
Index: roard/container_framework.c
===================================================================
--- roard/container_framework.c	(revision 5276)
+++ roard/container_framework.c	(revision 5278)
@@ -197,5 +197,5 @@
 }
 
-off_t   cont_fw_lseek   (struct roar_vio_calls * vio, off_t offset, int whence);
+roar_off_t   cont_fw_lseek   (struct roar_vio_calls * vio, roar_off_t offset, int whence);
 
 int     cont_fw_sync    (struct roar_vio_calls * vio) {
@@ -233,5 +233,5 @@
 }
 
-int     cont_fw_ctl     (struct roar_vio_calls * vio, int cmd, void * data);
+int     cont_fw_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data);
 
 // VIO Parent:
@@ -260,5 +260,5 @@
 }
 
-off_t   cont_pvio_lseek   (struct roar_vio_calls * vio, off_t offset, int whence) {
+roar_off_t   cont_pvio_lseek   (struct roar_vio_calls * vio, roar_off_t offset, int whence) {
  return roar_vio_lseek(&(((struct cont_fw_parent_inst*)(vio->inst))->stream.stream->vio), offset, whence);
 }
@@ -268,5 +268,5 @@
 }
 
-int     cont_pvio_ctl     (struct roar_vio_calls * vio, int cmd, void * data) {
+int     cont_pvio_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  return roar_vio_ctl(&(((struct cont_fw_parent_inst*)(vio->inst))->stream.stream->vio), cmd, data);
 }
Index: roard/driver.c
===================================================================
--- roard/driver.c	(revision 5276)
+++ roard/driver.c	(revision 5278)
@@ -317,5 +317,5 @@
 #endif
 
-int  driver_dummy_ctl(struct roar_vio_calls * vio, int cmd, void * data) {
+int  driver_dummy_ctl(struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  switch (cmd) {
   case ROAR_VIO_CTL_NONBLOCK:
Index: roard/driver_alsa.c
===================================================================
--- roard/driver_alsa.c	(revision 5276)
+++ roard/driver_alsa.c	(revision 5278)
@@ -324,5 +324,5 @@
  */
 
-int driver_alsa_ctl(struct roar_vio_calls * vio, int cmd, void * data) {
+int driver_alsa_ctl(struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  roar_alsa_t       * device    = vio->inst;
  snd_pcm_sframes_t alsa_delay;
Index: roard/driver_artsc.c
===================================================================
--- roard/driver_artsc.c	(revision 5276)
+++ roard/driver_artsc.c	(revision 5278)
@@ -156,5 +156,5 @@
 }
 
-int     driver_artsc_ctl     (struct roar_vio_calls * vio, int cmd, void * data) {
+int     driver_artsc_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  struct roar_artsc * self = vio->inst;
  ssize_t bps;
Index: roard/driver_dmx.c
===================================================================
--- roard/driver_dmx.c	(revision 5242)
+++ roard/driver_dmx.c	(revision 5278)
@@ -66,5 +66,5 @@
   return -1;
 
- if ( roar_vio_lseek(vio, 0, SEEK_SET) == (off_t)-1 )
+ if ( roar_vio_lseek(vio, 0, SEEK_SET) == (roar_off_t)-1 )
   return -1;
 
@@ -72,5 +72,5 @@
 }
 
-int driver_dmx_ctl(struct roar_vio_calls * vio, int cmd, void * data) {
+int driver_dmx_ctl(struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
 
  if ( vio == NULL )
Index: roard/driver_jack.c
===================================================================
--- roard/driver_jack.c	(revision 5276)
+++ roard/driver_jack.c	(revision 5278)
@@ -163,5 +163,5 @@
 }
 
-int     driver_jack_ctl     (struct roar_vio_calls * vio, int cmd, void * data) {
+int     driver_jack_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  struct driver_jack * self = vio->inst;
  // function for a lot control features.
@@ -184,4 +184,5 @@
     *(int*)data = FH...;
 */
+    roar_err_set(ROAR_ERROR_NOTSUP);
     return -1;
    break;
@@ -191,34 +192,42 @@
    break;
   case ROAR_VIO_CTL_NONBLOCK:
- // control if read and write calls should block untill all data is read or written.
- // state is in *(int*)data and could be:
- //  ROAR_SOCKET_BLOCK    - Block untill the data is read or written
- //  ROAR_SOCKET_NONBLOCK - Return as soon as possible
+    // control if read and write calls should block untill all data is read or written.
+    // state is in *(int*)data and could be:
+    //  ROAR_SOCKET_BLOCK    - Block untill the data is read or written
+    //  ROAR_SOCKET_NONBLOCK - Return as soon as possible
+    roar_err_set(ROAR_ERROR_NOTSUP);
+    return -1;
    break;
   case ROAR_VIO_CTL_GET_AUINFO:
   case ROAR_VIO_CTL_SET_AUINFO:
     // get or set audio info, data is a struct roar_audio_info*.
+    roar_err_set(ROAR_ERROR_NOTSUP);
     return -1;
    break;
   case ROAR_VIO_CTL_GET_DBLKSIZE:
   case ROAR_VIO_CTL_SET_DBLKSIZE:
-     // get or set block size used, data is uint_least32_t*, number of bytes.
+    // get or set block size used, data is uint_least32_t*, number of bytes.
+    roar_err_set(ROAR_ERROR_NOTSUP);
     return -1;
    break;
   case ROAR_VIO_CTL_GET_DBLOCKS:
   case ROAR_VIO_CTL_SET_DBLOCKS:
-     // get or set number of blocks used, data is uint_least32_t*.
+    // get or set number of blocks used, data is uint_least32_t*.
+    roar_err_set(ROAR_ERROR_NOTSUP);
     return -1;
    break;
   case ROAR_VIO_CTL_SET_SSTREAM:
     // set server stream object for this stream, data is struct roar_stream_server*
+    roar_err_set(ROAR_ERROR_NOTSUP);
     return -1;
    break;
   case ROAR_VIO_CTL_SET_SSTREAMID:
     // set stream ID for this stream, data is int*
+    roar_err_set(ROAR_ERROR_NOTSUP);
     return -1;
    break;
   case ROAR_VIO_CTL_SET_VOLUME:
     // set volume for this device, data is struct roar_mixer_settings*
+    roar_err_set(ROAR_ERROR_NOTSUP);
     return -1;
    break;
@@ -226,10 +235,11 @@
     // get delay of this stream, data is uint_least32_t*, in bytes
     // there is more about delay. please ask.
-    return -1;
-   break;
-  default:
-    return -1;
-   break;
- }
+    roar_err_set(ROAR_ERROR_NOTSUP);
+    return -1;
+   break;
+ }
+
+ roar_err_set(ROAR_ERROR_BADRQC);
+ return -1;
 }
 
Index: roard/driver_oss.c
===================================================================
--- roard/driver_oss.c	(revision 5276)
+++ roard/driver_oss.c	(revision 5278)
@@ -455,5 +455,5 @@
 }
 
-int driver_oss_ctl(struct roar_vio_calls * vio, int cmd, void * data) {
+int driver_oss_ctl(struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  struct driver_oss * self = vio->inst;
 #ifdef SNDCTL_DSP_GETODELAY
Index: roard/driver_pulsesimple.c
===================================================================
--- roard/driver_pulsesimple.c	(revision 5276)
+++ roard/driver_pulsesimple.c	(revision 5278)
@@ -159,5 +159,5 @@
 }
 
-int     driver_pulsesimple_ctl          (struct roar_vio_calls * vio, int cmd, void * data) {
+int     driver_pulsesimple_ctl          (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  struct driver_pulsesimple * self = vio->inst;
 
Index: roard/driver_pwmled.c
===================================================================
--- roard/driver_pwmled.c	(revision 5276)
+++ roard/driver_pwmled.c	(revision 5278)
@@ -122,5 +122,5 @@
 }
 
-int driver_pwmled_ctl(struct roar_vio_calls * vio, int cmd, void * data) {
+int driver_pwmled_ctl(struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  struct driver_pwmled * self = vio->inst;
 
Index: roard/driver_sndio.c
===================================================================
--- roard/driver_sndio.c	(revision 5276)
+++ roard/driver_sndio.c	(revision 5278)
@@ -37,5 +37,4 @@
  vio->sync     = driver_sndio_sync;
  vio->ctl      = driver_sndio_ctl;
- vio->nonblock = driver_dummy_nonblock;
 
  vio->inst     = (void*) inst;
@@ -230,5 +229,5 @@
 #define no_data(x) x: if ( data != NULL ) return -1;
 
-int     driver_sndio_ctl          (struct roar_vio_calls * vio, int cmd, void * data) {
+int     driver_sndio_ctl          (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  struct driver_sndio * self = vio->inst;
  unsigned d;
Index: roard/include/container_framework.h
===================================================================
--- roard/include/container_framework.h	(revision 4708)
+++ roard/include/container_framework.h	(revision 5278)
@@ -82,8 +82,7 @@
 ssize_t cont_fw_read    (struct roar_vio_calls * vio, void *buf, size_t count);
 ssize_t cont_fw_write   (struct roar_vio_calls * vio, void *buf, size_t count);
-off_t   cont_fw_lseek   (struct roar_vio_calls * vio, off_t offset, int whence);
-int     cont_fw_nonblock(struct roar_vio_calls * vio, int state);
+roar_off_t   cont_fw_lseek   (struct roar_vio_calls * vio, roar_off_t offset, int whence);
 int     cont_fw_sync    (struct roar_vio_calls * vio);
-int     cont_fw_ctl     (struct roar_vio_calls * vio, int cmd, void * data);
+int     cont_fw_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data);
 int     cont_fw_close   (struct roar_vio_calls * vio);
 
@@ -92,8 +91,7 @@
 ssize_t cont_pvio_read    (struct roar_vio_calls * vio, void *buf, size_t count);
 ssize_t cont_pvio_write   (struct roar_vio_calls * vio, void *buf, size_t count);
-off_t   cont_pvio_lseek   (struct roar_vio_calls * vio, off_t offset, int whence);
-int     cont_pvio_nonblock(struct roar_vio_calls * vio, int state);
+roar_off_t   cont_pvio_lseek   (struct roar_vio_calls * vio, roar_off_t offset, int whence);
 int     cont_pvio_sync    (struct roar_vio_calls * vio);
-int     cont_pvio_ctl     (struct roar_vio_calls * vio, int cmd, void * data);
+int     cont_pvio_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data);
 int     cont_pvio_close   (struct roar_vio_calls * vio);
 
Index: roard/include/driver.h
===================================================================
--- roard/include/driver.h	(revision 5276)
+++ roard/include/driver.h	(revision 5278)
@@ -159,5 +159,5 @@
 #endif
 
-int  driver_dummy_ctl(struct roar_vio_calls * vio, int cmd, void * data);
+int  driver_dummy_ctl(struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data);
 
 #endif
Index: roard/include/driver_alsa.h
===================================================================
--- roard/include/driver_alsa.h	(revision 4708)
+++ roard/include/driver_alsa.h	(revision 5278)
@@ -41,5 +41,5 @@
 int     driver_alsa_close   (struct roar_vio_calls * vio);
 int     driver_alsa_sync    (struct roar_vio_calls * vio);
-int     driver_alsa_ctl     (struct roar_vio_calls * vio, int cmd, void * data);
+int     driver_alsa_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data);
 
 #endif
Index: roard/include/driver_artsc.h
===================================================================
--- roard/include/driver_artsc.h	(revision 4809)
+++ roard/include/driver_artsc.h	(revision 5278)
@@ -35,6 +35,5 @@
 ssize_t driver_artsc_write   (struct roar_vio_calls * vio, void *buf, size_t count);
 int     driver_artsc_close   (struct roar_vio_calls * vio);
-int     driver_artsc_nonblock(struct roar_vio_calls * vio, int state);
-int     driver_artsc_ctl     (struct roar_vio_calls * vio, int cmd, void * data);
+int     driver_artsc_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data);
 
 #endif
Index: roard/include/driver_dmx.h
===================================================================
--- roard/include/driver_dmx.h	(revision 4708)
+++ roard/include/driver_dmx.h	(revision 5278)
@@ -35,5 +35,5 @@
 int driver_dmx_open_vio  (struct roar_vio_calls * inst, char * device, struct roar_audio_info * info, int fh, struct roar_stream_server * sstream);
 ssize_t driver_dmx_write (struct roar_vio_calls * vio,  void *buf, size_t count);
-int     driver_dmx_ctl   (struct roar_vio_calls * vio,  int cmd, void * data);
+int     driver_dmx_ctl   (struct roar_vio_calls * vio,  roar_vio_ctl_t cmd, void * data);
 
 #endif
Index: roard/include/driver_jack.h
===================================================================
--- roard/include/driver_jack.h	(revision 4825)
+++ roard/include/driver_jack.h	(revision 5278)
@@ -38,7 +38,6 @@
 ssize_t driver_jack_read    (struct roar_vio_calls * vio, void *buf, size_t count);
 ssize_t driver_jack_write   (struct roar_vio_calls * vio, void *buf, size_t count);
-int     driver_jack_nonblock(struct roar_vio_calls * vio, int state);
 int     driver_jack_sync    (struct roar_vio_calls * vio);
-int     driver_jack_ctl     (struct roar_vio_calls * vio, int cmd, void * data);
+int     driver_jack_ctl     (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data);
 int     driver_jack_close   (struct roar_vio_calls * vio);
 
Index: roard/include/driver_oss.h
===================================================================
--- roard/include/driver_oss.h	(revision 5276)
+++ roard/include/driver_oss.h	(revision 5278)
@@ -42,5 +42,5 @@
 int driver_oss_close(DRIVER_USERDATA_T   inst);
 int driver_oss_sync(struct roar_vio_calls * vio);
-int driver_oss_ctl(struct roar_vio_calls * vio, int cmd, void * data);
+int driver_oss_ctl(struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data);
 
 ssize_t driver_oss_write    (struct roar_vio_calls * vio, void *buf, size_t count);
Index: roard/include/driver_portaudio.h
===================================================================
--- roard/include/driver_portaudio.h	(revision 4858)
+++ roard/include/driver_portaudio.h	(revision 5278)
@@ -49,6 +49,4 @@
 ssize_t driver_portaudio_write        (struct roar_vio_calls * vio, void *buf, size_t count);
 int     driver_portaudio_sync         (struct roar_vio_calls * vio);
-int     driver_portaudio_ctl          (struct roar_vio_calls * vio, int cmd, void * data);
-int     driver_portaudio_nonblock     (struct roar_vio_calls * vio, int state);
 
 #endif
Index: roard/include/driver_pulsesimple.h
===================================================================
--- roard/include/driver_pulsesimple.h	(revision 4708)
+++ roard/include/driver_pulsesimple.h	(revision 5278)
@@ -41,5 +41,5 @@
 ssize_t driver_pulsesimple_write        (struct roar_vio_calls * vio, void *buf, size_t count);
 int     driver_pulsesimple_sync         (struct roar_vio_calls * vio);
-int     driver_pulsesimple_ctl          (struct roar_vio_calls * vio, int cmd, void * data);
+int     driver_pulsesimple_ctl          (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data);
 
 
Index: roard/include/driver_pwmled.h
===================================================================
--- roard/include/driver_pwmled.h	(revision 4708)
+++ roard/include/driver_pwmled.h	(revision 5278)
@@ -42,5 +42,5 @@
 int driver_pwmled_open_vio  (struct roar_vio_calls * inst, char * device, struct roar_audio_info * info, int fh, struct roar_stream_server * sstream);
 ssize_t driver_pwmled_write (struct roar_vio_calls * vio,  void *buf, size_t count);
-int     driver_pwmled_ctl   (struct roar_vio_calls * vio,  int cmd, void * data);
+int     driver_pwmled_ctl   (struct roar_vio_calls * vio,  roar_vio_ctl_t cmd, void * data);
 int     driver_pwmled_close (struct roar_vio_calls * vio);
 
Index: roard/include/driver_sndio.h
===================================================================
--- roard/include/driver_sndio.h	(revision 4708)
+++ roard/include/driver_sndio.h	(revision 5278)
@@ -46,5 +46,5 @@
 ssize_t driver_sndio_write        (struct roar_vio_calls * vio, void *buf, size_t count);
 int     driver_sndio_sync         (struct roar_vio_calls * vio);
-int     driver_sndio_ctl          (struct roar_vio_calls * vio, int cmd, void * data);
+int     driver_sndio_ctl          (struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data);
 
 
Index: roard/include/driver_sysclock.h
===================================================================
--- roard/include/driver_sysclock.h	(revision 4897)
+++ roard/include/driver_sysclock.h	(revision 5278)
@@ -35,5 +35,4 @@
 int     driver_sysclock_open_vio(struct roar_vio_calls * inst, char * device, struct roar_audio_info * info, int fh, struct roar_stream_server * sstream);
 int     driver_sysclock_close   (struct roar_vio_calls * vio);
-int     driver_sysclock_nonblock(struct roar_vio_calls * vio, int state);
 ssize_t driver_sysclock_write   (struct roar_vio_calls * vio, void *buf, size_t count);
 
Index: roard/include/midi.h
===================================================================
--- roard/include/midi.h	(revision 5276)
+++ roard/include/midi.h	(revision 5278)
@@ -174,6 +174,4 @@
 // dummys:
 int     midi_vio_set_dummy(int stream);
-int     midi_vio_ctl(struct roar_vio_calls * vio, int cmd, void * data);
-int     midi_vio_ok(struct roar_vio_calls * vio, ...);
 
 #endif
Index: roard/midi.c
===================================================================
--- roard/midi.c	(revision 5276)
+++ roard/midi.c	(revision 5278)
@@ -1049,4 +1049,14 @@
 // VIO:
 
+static int midi_vio_ctl(struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
+ if ( cmd == ROAR_VIO_CTL_NONBLOCK )
+  return 0;
+ return -1;
+}
+
+static int     midi_vio_ok(struct roar_vio_calls * vio, ...) {
+ return 0;
+}
+
 int     midi_vio_set_dummy(int stream) {
  struct roar_stream_server * ss;
@@ -1065,14 +1075,4 @@
 }
 
-int midi_vio_ctl(struct roar_vio_calls * vio, int cmd, void * data) {
- if ( cmd == ROAR_VIO_CTL_NONBLOCK )
-  return 0;
- return -1;
-}
-
-int     midi_vio_ok(struct roar_vio_calls * vio, ...) {
- return 0;
-}
-
 #endif
 
Index: roard/sources.c
===================================================================
--- roard/sources.c	(revision 5276)
+++ roard/sources.c	(revision 5278)
@@ -323,5 +323,5 @@
   }
 
-  if ( roar_vio_lseek(vio, -len, SEEK_CUR) == (off_t)-1 ) {
+  if ( roar_vio_lseek(vio, -len, SEEK_CUR) == (roar_off_t)-1 ) {
    _ret(-1);
   }
@@ -418,5 +418,5 @@
 }
 
-static int  sources_radionoise_ctl(struct roar_vio_calls * vio, int cmd, void * data) {
+static int  sources_radionoise_ctl(struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) {
  if ( cmd == ROAR_VIO_CTL_NONBLOCK )
   return 0;
