Makefile.in: Fix typo in definition of all_objs.
[paraslash.git] / oss_write.c
index 6a55005ec8247a46c424ebabe9308e03f03c1d24..7edd486fccc37a295700b3dedd9cc0da76976e24 100644 (file)
@@ -6,6 +6,7 @@
 
 /** \file oss_write.c Paraslash's oss output plugin. */
 
+#include <regex.h>
 #include <sys/ioctl.h>
 #include <fcntl.h>
 #include <dirent.h>
@@ -47,13 +48,13 @@ static int oss_pre_select(struct sched *s, struct writer_node *wn)
        struct private_oss_write_data *powd = wn->private_data;
        struct writer_node_group *wng = wn->wng;
 
-       if (!*wng->loaded)
+       if (*wng->loaded - wn->written < powd->bytes_per_frame)
                return 0;
        para_fd_set(powd->fd, &s->wfds, &s->max_fileno);
        return 1;
 }
-static int oss_post_select(__a_unused struct sched *s,
-               struct writer_node *wn)
+
+static int oss_post_select(struct sched *s, struct writer_node *wn)
 {
        int ret;
        struct private_oss_write_data *powd = wn->private_data;