filter: Remove allocation of filter buffers.
[paraslash.git] / wav_filter.c
index 4f12a34c03fe5a74d58e772ba76df23f40fa5735..5b879f2d6270344b96ad95c9d061a484b5c76222 100644 (file)
 #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)