X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=wav_filter.c;h=5b879f2d6270344b96ad95c9d061a484b5c76222;hp=4f12a34c03fe5a74d58e772ba76df23f40fa5735;hb=d9d83772fbee853857f1904fa6553f06a026108c;hpb=7991d2871340f773ad7d0e819491fe905b184a5c diff --git a/wav_filter.c b/wav_filter.c index 4f12a34c..5b879f2d 100644 --- a/wav_filter.c +++ b/wav_filter.c @@ -19,11 +19,9 @@ #include "string.h" #include "portable_io.h" -/** size of the output buffer */ -#define WAV_OUTBUF_SIZE 81920 -/** a wav header is always 44 bytes */ +/** A wav header is always 44 bytes. */ #define WAV_HEADER_LEN 44 -/** always write 16 bit header */ +/** Always write 16 bit header. */ #define BITS 16 static void make_wav_header(unsigned int channels, unsigned int samplerate, @@ -53,8 +51,6 @@ static void make_wav_header(unsigned int channels, unsigned int samplerate, static void wav_close(struct filter_node *fn) { - free(fn->buf); - fn->buf = NULL; free(fn->private_data); fn->private_data = NULL; } @@ -63,14 +59,9 @@ static void wav_open(struct filter_node *fn) { int *bof; - fn->bufsize = WAV_OUTBUF_SIZE; - fn->buf = para_malloc(fn->bufsize); fn->private_data = para_malloc(sizeof(int)); bof = fn->private_data; - fn->loaded = 0; *bof = 1; - PARA_INFO_LOG("wav filter node: %p, output buffer: %p, loaded: %zd\n", - fn, fn->buf, fn->loaded); } static void wav_pre_select(struct sched *s, struct task *t)