00001 #include "c_lpc10.h" 00002 00003 /**********************************************************/ 00004 00005 VOID c_lpc10_ini( VOID ) 00006 { 00007 coder_ini(); 00008 } 00009 00010 /**********************************************************/ 00011 00012 VOID c_lpc10_code( FLOAT speech[] ) 00013 { 00014 /* shift sample and other buffers */ 00015 shift(); 00016 /* prepare and copy input buffer */ 00017 framein(speech); 00018 /* analyze frame */ 00019 analys(); 00020 } 00021 00022 /**********************************************************/ 00023 00024 VOID c_lpc10_code_i16( INT16 speech[] ) 00025 { 00026 /* shift sample and other buffers */ 00027 shift(); 00028 /* prepare and copy input buffer */ 00029 framein_i16(speech); 00030 /* analyze frame */ 00031 analys(); 00032 } 00033 00034 /**********************************************************/ 00035 00036 VOID c_lpc10_peek( BOOL voice[2], INT *pitch, 00037 FLOAT *rms, FLOAT rc[ORDER] ) 00038 { 00039 INDEX i; 00040 00041 /* Set return parameters */ 00042 voice[0] = CODED_VOICE[0]; 00043 voice[1] = CODED_VOICE[1]; 00044 00045 if (CODED_VOICE[0]||CODED_VOICE[1]) 00046 *pitch=(INT)(G_tau[CODED_PITCH]); 00047 else 00048 *pitch = 0; 00049 *rms = CODED_RMS; 00050 for (i = 0; i < ORDER; i++) 00051 rc[i] = CODED_RC[i]; 00052 } 00053 00054 /**********************************************************/ 00055