X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=mp3dec.c;h=763ca37f2288eab98d0bcb34d6f641f7d4b38793;hp=335c2baaea66f2ac6b9392b177958101fc36b0e2;hb=a8beedcaa6f25a0dda36975a30a65a2038df6e30;hpb=f695fe47a8a6509379225c837dadfa9837a7d746 diff --git a/mp3dec.c b/mp3dec.c index 335c2baa..763ca37f 100644 --- a/mp3dec.c +++ b/mp3dec.c @@ -1,22 +1,10 @@ /* - * Copyright (C) 2005-2007 Andre Noll + * Copyright (C) 2005-2008 Andre Noll * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + * Licensed under the GPL v2. For licencing details see COPYING. */ -/** \file mp3dec.c paraslash's mp3 decoder */ +/** \file mp3dec.c Paraslash's mp3 decoder. */ #include "para.h" #include "list.h" @@ -26,25 +14,20 @@ #include #include "string.h" -/** the output buffer size */ -#define MP3_OUTBUF_SIZE 128 * 1024 +/** The output buffer size. */ +#define MP3_OUTBUF_SIZE (128 * 1024) -/** \cond a helper macro */ +/** Convert a sample value from libmad to a signed short. */ #define MAD_TO_SHORT(f) (f) >= MAD_F_ONE? SHRT_MAX :\ (f) <= -MAD_F_ONE? -SHRT_MAX : (signed short) ((f) >> (MAD_F_FRACBITS - 15)) -/** \endcond */ -/** - * data specific to the mp3dec filter - * - * \sa filter, filter_node - */ +/** Data specific to the mp3dec filter. */ struct private_mp3dec_data { - /** information on the current mp3 stream */ + /** Information on the current mp3 stream. */ struct mad_stream stream; - /** information about the frame which is currently decoded */ + /** Information about the frame which is currently decoded. */ struct mad_frame frame; - /** contains the PCM output */ + /** Contains the PCM output. */ struct mad_synth synth; }; @@ -127,11 +110,11 @@ static void mp3dec_open(struct filter_node *fn) } /** - * the init function of the mp3dec filter + * The init function of the mp3dec filter. * - * \param f pointer to the filter struct to initialize + * \param f Pointer to the filter struct to initialize. * - * \sa filter::init + * \sa filter::init. */ void mp3dec_init(struct filter *f) {