X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;ds=sidebyside;f=oss_write.c;h=bda0ad4cb7189fec9311c1cdfb9896e3fe9b7598;hb=1e012cf40238883621692051a22fb9c7cad5e944;hp=6a55005ec8247a46c424ebabe9308e03f03c1d24;hpb=678a55163f159783c688370b9b974a8a5e1fcd06;p=paraslash.git diff --git a/oss_write.c b/oss_write.c index 6a55005e..bda0ad4c 100644 --- a/oss_write.c +++ b/oss_write.c @@ -6,10 +6,12 @@ /** \file oss_write.c Paraslash's oss output plugin. */ +#include #include #include #include #include +#include #include "para.h" #include "fd.h" @@ -17,6 +19,7 @@ #include "list.h" #include "sched.h" #include "ggo.h" +#include "buffer_tree.h" #include "write.h" #include "oss_write.cmdline.h" #include "error.h" @@ -47,13 +50,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;