synth.h

00001 /*
00002  * libmad - MPEG audio decoder library
00003  * Copyright (C) 2000-2003 Underbit Technologies, Inc.
00004  *
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation; either version 2 of the License, or
00008  * (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018  *
00019  * $Id: synth.h,v 1.1 2003/08/31 19:00:17 gabest Exp $
00020  */
00021 
00022 # ifndef LIBMAD_SYNTH_H
00023 # define LIBMAD_SYNTH_H
00024 
00025 # include "fixed.h"
00026 # include "frame.h"
00027 
00028 struct mad_pcm {
00029   unsigned int samplerate;              /* sampling frequency (Hz) */
00030   unsigned short channels;              /* number of channels */
00031   unsigned short length;                /* number of samples per channel */
00032   mad_fixed_t samples[2][1152];         /* PCM output samples [ch][sample] */
00033 };
00034 
00035 struct mad_synth {
00036   mad_fixed_t filter[2][2][2][16][8];   /* polyphase filterbank outputs */
00037                                         /* [ch][eo][peo][s][v] */
00038 
00039   unsigned int phase;                   /* current processing phase */
00040 
00041   struct mad_pcm pcm;                   /* PCM output */
00042 };
00043 
00044 /* single channel PCM selector */
00045 enum {
00046   MAD_PCM_CHANNEL_SINGLE = 0
00047 };
00048 
00049 /* dual channel PCM selector */
00050 enum {
00051   MAD_PCM_CHANNEL_DUAL_1 = 0,
00052   MAD_PCM_CHANNEL_DUAL_2 = 1
00053 };
00054 
00055 /* stereo PCM selector */
00056 enum {
00057   MAD_PCM_CHANNEL_STEREO_LEFT  = 0,
00058   MAD_PCM_CHANNEL_STEREO_RIGHT = 1
00059 };
00060 
00061 void mad_synth_init(struct mad_synth *);
00062 
00063 # define mad_synth_finish(synth)  /* nothing */
00064 
00065 void mad_synth_mute(struct mad_synth *);
00066 
00067 void mad_synth_frame(struct mad_synth *, struct mad_frame const *);
00068 
00069 # endif

Generated on Tue Dec 13 14:47:49 2005 for guliverkli by  doxygen 1.4.5