X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=oss_write.c;h=85357f9379f01c70244754f3c717f23d78864231;hp=090f990565ce10b7eb85bd8dde2c391c132797c4;hb=d4b040af5e31260dbf71f4547484179f32be4746;hpb=b5b5d00eea33eccd3d2d75057c5254bf85568b00 diff --git a/oss_write.c b/oss_write.c index 090f9905..85357f93 100644 --- a/oss_write.c +++ b/oss_write.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2010 Andre Noll + * Copyright (C) 2009-2012 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -9,9 +9,7 @@ #include #include #include -#include #include -#include #include "para.h" #include "fd.h" @@ -88,7 +86,6 @@ static int oss_init(struct writer_node *wn, unsigned sample_rate, struct oss_write_args_info *conf = wn->conf; struct private_oss_write_data *powd = para_calloc(sizeof(*powd)); - wn->private_data = powd; PARA_INFO_LOG("opening %s\n", conf->device_arg); ret = para_open(conf->device_arg, O_WRONLY, 0); if (ret < 0) @@ -149,6 +146,7 @@ static int oss_init(struct writer_node *wn, unsigned sample_rate, sample_rate); } wn->min_iqs = powd->bytes_per_frame; + wn->private_data = powd; return 1; err: close(powd->fd); @@ -185,7 +183,7 @@ static void oss_post_select(__a_unused struct sched *s, bytes = btr_next_buffer(btrn, &data); frames = bytes / powd->bytes_per_frame; if (!frames) { /* eof and less than a single frame available */ - ret = -E_OSS_EOF; + ret = -E_WRITE_COMMON_EOF; goto out; } ret = 0;