annotate src/libmad-0.15.1b/synth.h @ 83:ae30d91d2ffe

Replace these with versions built using an older toolset (so as to avoid ABI compatibilities when linking on Ubuntu 14.04 for packaging purposes)
author Chris Cannam
date Fri, 07 Feb 2020 11:51:13 +0000
parents c7265573341e
children
rev   line source
Chris@0 1 /*
Chris@0 2 * libmad - MPEG audio decoder library
Chris@0 3 * Copyright (C) 2000-2004 Underbit Technologies, Inc.
Chris@0 4 *
Chris@0 5 * This program is free software; you can redistribute it and/or modify
Chris@0 6 * it under the terms of the GNU General Public License as published by
Chris@0 7 * the Free Software Foundation; either version 2 of the License, or
Chris@0 8 * (at your option) any later version.
Chris@0 9 *
Chris@0 10 * This program is distributed in the hope that it will be useful,
Chris@0 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Chris@0 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Chris@0 13 * GNU General Public License for more details.
Chris@0 14 *
Chris@0 15 * You should have received a copy of the GNU General Public License
Chris@0 16 * along with this program; if not, write to the Free Software
Chris@0 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Chris@0 18 *
Chris@0 19 * $Id: synth.h,v 1.15 2004/01/23 09:41:33 rob Exp $
Chris@0 20 */
Chris@0 21
Chris@0 22 # ifndef LIBMAD_SYNTH_H
Chris@0 23 # define LIBMAD_SYNTH_H
Chris@0 24
Chris@0 25 # include "fixed.h"
Chris@0 26 # include "frame.h"
Chris@0 27
Chris@0 28 struct mad_pcm {
Chris@0 29 unsigned int samplerate; /* sampling frequency (Hz) */
Chris@0 30 unsigned short channels; /* number of channels */
Chris@0 31 unsigned short length; /* number of samples per channel */
Chris@0 32 mad_fixed_t samples[2][1152]; /* PCM output samples [ch][sample] */
Chris@0 33 };
Chris@0 34
Chris@0 35 struct mad_synth {
Chris@0 36 mad_fixed_t filter[2][2][2][16][8]; /* polyphase filterbank outputs */
Chris@0 37 /* [ch][eo][peo][s][v] */
Chris@0 38
Chris@0 39 unsigned int phase; /* current processing phase */
Chris@0 40
Chris@0 41 struct mad_pcm pcm; /* PCM output */
Chris@0 42 };
Chris@0 43
Chris@0 44 /* single channel PCM selector */
Chris@0 45 enum {
Chris@0 46 MAD_PCM_CHANNEL_SINGLE = 0
Chris@0 47 };
Chris@0 48
Chris@0 49 /* dual channel PCM selector */
Chris@0 50 enum {
Chris@0 51 MAD_PCM_CHANNEL_DUAL_1 = 0,
Chris@0 52 MAD_PCM_CHANNEL_DUAL_2 = 1
Chris@0 53 };
Chris@0 54
Chris@0 55 /* stereo PCM selector */
Chris@0 56 enum {
Chris@0 57 MAD_PCM_CHANNEL_STEREO_LEFT = 0,
Chris@0 58 MAD_PCM_CHANNEL_STEREO_RIGHT = 1
Chris@0 59 };
Chris@0 60
Chris@0 61 void mad_synth_init(struct mad_synth *);
Chris@0 62
Chris@0 63 # define mad_synth_finish(synth) /* nothing */
Chris@0 64
Chris@0 65 void mad_synth_mute(struct mad_synth *);
Chris@0 66
Chris@0 67 void mad_synth_frame(struct mad_synth *, struct mad_frame const *);
Chris@0 68
Chris@0 69 # endif