1 /* 2 * Siren Encoder/Decoder library 3 * 4 * @author: Youness Alaoui <kakaroto@kakaroto.homelinux.net> 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Library General Public 8 * License as published by the Free Software Foundation; either 9 * version 2 of the License, or (at your option) any later version. 10 * 11 * This library is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * Library General Public License for more details. 15 * 16 * You should have received a copy of the GNU Library General Public 17 * License along with this library; if not, write to the 18 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 19 * Boston, MA 02110-1301, USA. 20 */ 21 22 23 #ifndef _SIREN_DECODER_H 24 #define _SIREN_DECODER_H 25 26 #include <math.h> 27 #include <stdlib.h> 28 #include <string.h> 29 #include "dct4.h" 30 #include "rmlt.h" 31 #include "huffman.h" 32 #include "common.h" 33 34 35 typedef struct stSirenDecoder { 36 int sample_rate; 37 PCMWavHeader WavHeader; 38 float context[320]; 39 float backup_frame[320]; 40 int dw1; 41 int dw2; 42 int dw3; 43 int dw4; 44 } * SirenDecoder; 45 46 47 /* MUST be 16000 to be compatible with MSN Voice clips (I think) */ 48 extern SirenDecoder Siren7_NewDecoder(int sample_rate); 49 extern void Siren7_CloseDecoder(SirenDecoder decoder); 50 extern int Siren7_DecodeFrame(SirenDecoder decoder, unsigned char *DataIn, unsigned char *DataOut); 51 52 #endif /* _SIREN_DECODER_H */ 53