-/*
- * Copyright (C) 2005 Andre Noll <maan@tuebingen.mpg.de>
- *
- * Licensed under the GPL v2. For licencing details see COPYING.
- */
+/* Copyright (C) 2005 Andre Noll <maan@tuebingen.mpg.de>, see file COPYING. */
/** \file mp3dec_filter.c Paraslash's mp3 decoder. */
#define MP3DEC_MAX_FRAME 8192
-static int mp3dec_post_select(__a_unused struct sched *s, void *context)
+static int mp3dec_post_monitor(__a_unused struct sched *s, void *context)
{
struct filter_node *fn = context;
int i, ret;
btr_merge(btrn, fn->min_iqs);
len = btr_next_buffer(btrn, &inbuffer);
/*
- * Decode at most 8K in one go to give the post_select() functions of
+ * Decode at most 8K in one go to give the post_monitor() functions of
* other buffer tree nodes a chance to run. This is necessary to avoid
* buffer underruns on slow machines.
*/
}
fn->min_iqs = 0;
mad_synth_frame(&pmd->synth, &pmd->frame);
- outbuffer = para_malloc(pmd->synth.pcm.length * 2 * pmd->channels);
+ outbuffer = arr_alloc(pmd->synth.pcm.length, 2 * pmd->channels);
loaded = 0;
for (i = 0; i < pmd->synth.pcm.length; i++) {
int sample = MAD_TO_SHORT(pmd->synth.pcm.samples[0][i]);
static void mp3dec_open(struct filter_node *fn)
{
- struct private_mp3dec_data *pmd = para_calloc(sizeof(*pmd));
+ struct private_mp3dec_data *pmd = zalloc(sizeof(*pmd));
fn->private_data = pmd;
mad_stream_init(&pmd->stream);
const struct filter lsg_filter_cmd_com_mp3dec_user_data = {
.open = mp3dec_open,
.close = mp3dec_close,
- .pre_select = generic_filter_pre_select,
- .post_select = mp3dec_post_select,
+ .pre_monitor = generic_filter_pre_monitor,
+ .post_monitor = mp3dec_post_monitor,
.execute = mp3dec_execute,
};