/*
 * ===================================================================
 *  TS 26.104
 *  REL-5 V5.4.0 2004-03
 *  REL-6 V6.1.0 2004-03
 *  3GPP AMR Floating-point Speech Codec
 * ===================================================================
 *
 */

/*
 * sp_enc.h
 *
 *
 * Project:
 *    AMR Floating-Point Codec
 *
 * Contains:
 *    Defines interface to AMR encoder
 *
 */
#ifndef _SP_DEC_H_
#define _SP_DEC_H_

#define	MR475	0	//added by croquet
#define	MR515	1	//added by croquet
#define	MR59	2	//added by croquet
#define	MR67	3	//added by croquet
#define	MR74	4	//added by croquet
#define	MR795	5	//added by croquet
#define	MR102	6	//added by croquet
#define	MR122	7	//added by croquet
#define	MRDTX	8	//added by croquet

/*
 * definition of enumerated types
 */

/*
 * definition of modes for decoder
 */
//enum Mode { MR475 = 0,
//            MR515,
//            MR59,
//            MR67,
//            MR74,
//            MR795,
//            MR102,
//            MR122,
//            MRDTX,
//            N_MODES     /* number of (SPC) modes */
//};

#define RX_SPEECH_GOOD		0
#define RX_SPEECH_DEGRADED	1
#define RX_ONSET			2
#define RX_SPEECH_BAD		3
#define RX_SID_FIRST		4
#define RX_SID_UPDATE		5
#define RX_SID_BAD			6
#define RX_NO_DATA			7
#define RX_N_FRAMETYPES		8

/* Declaration recieved frame types */
//enum RXFrameType { RX_SPEECH_GOOD = 0,
//                   RX_SPEECH_DEGRADED,
//                   RX_ONSET,
//                   RX_SPEECH_BAD,
//                   RX_SID_FIRST,
//                   RX_SID_UPDATE,
//                   RX_SID_BAD,
//                   RX_NO_DATA,
//                   RX_N_FRAMETYPES     /* number of frame types */
//};

/*
 * Function prototypes
 */

/*
 * initialize one instance of the speech decoder
 */
void* Speech_Decode_Frame_init ();

/*
 * free status struct
 */
void Speech_Decode_Frame_exit (void **st);

/*
 * Decodes one frame from encoded parameters
 */
void Speech_Decode_Frame (void *st, int mode, short *serial, int frame_type, short *synth);

/*
 * reset speech decoder
 */
int Speech_Decode_Frame_reset (void **st);

#endif

