00001 /* 00002 * libmad - MPEG audio decoder library 00003 * Copyright (C) 2000-2008 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 88 2008-06-09 11:59:11Z mich $ 00020 */ 00024 # ifndef LIBMAD_SYNTH_H 00025 # define LIBMAD_SYNTH_H 00026 00027 # include "fixed.h" 00028 # include "frame.h" 00029 00030 struct mad_pcm { 00031 unsigned int samplerate; 00032 unsigned short channels; 00033 unsigned short length; 00034 mad_fixed_t samples[2][1152]; 00035 }; 00036 00037 struct mad_synth { 00038 mad_fixed_t filter[2][2][2][16][8]; 00041 unsigned int phase; 00043 struct mad_pcm pcm; 00044 }; 00045 00047 enum { 00048 MAD_PCM_CHANNEL_SINGLE = 0 00049 }; 00050 00052 enum { 00053 MAD_PCM_CHANNEL_DUAL_1 = 0, 00054 MAD_PCM_CHANNEL_DUAL_2 = 1 00055 }; 00056 00058 enum { 00059 MAD_PCM_CHANNEL_STEREO_LEFT = 0, 00060 MAD_PCM_CHANNEL_STEREO_RIGHT = 1 00061 }; 00062 00063 void mad_synth_init(struct mad_synth *); 00064 00065 # define mad_synth_finish(synth) /* nothing */ 00066 00067 void mad_synth_mute(struct mad_synth *); 00068 00069 void mad_synth_frame(struct mad_synth *, struct mad_frame const *); 00070 00071 # endif