/* Subroutine */ int lpc10_encode(real *speech, integer *bits, struct lpc10_encoder_state *st) { integer irms, voice[2], pitch, ipitv; real rc[10]; extern /* Subroutine */ int encode_(integer *, integer *, real *, real *, integer *, integer *, integer *), chanwr_(integer *, integer *, integer *, integer *, integer *, struct lpc10_encoder_state *), analys_(real *, integer *, integer *, real *, real *, struct lpc10_encoder_state *), prepro_(real *, integer *, struct lpc10_encoder_state *); integer irc[10]; real rms; /* Arguments */ /* $Log$ * Revision 1.15 2004/06/26 03:50:14 markster * Merge source cleanups (bug #1911) * /* Revision 1.14 2003/02/12 13:59:15 matteo /* mer feb 12 14:56:57 CET 2003 /* /* Revision 1.1.1.1 2003/02/12 13:59:15 matteo /* mer feb 12 14:56:57 CET 2003 /* /* Revision 1.2 2000/01/05 08:20:39 markster /* Some OSS fixes and a few lpc changes to make it actually work /* * Revision 1.2 1996/08/20 20:31:21 jaf * Removed all static local variables that were SAVE'd in the Fortran * code, and put them in struct lpc10_encoder_state that is passed as an * argument. * * Removed init function, since all initialization is now done in * init_lpc10_encoder_state(). * * Changed name of function from lpcenc_ to lpc10_encode, simply to make * all lpc10 functions have more consistent naming with each other. * * Revision 1.1 1996/08/19 22:31:44 jaf * Initial revision * */ /* Revision 1.3 1996/03/29 22:03:47 jaf */ /* Removed definitions for any constants that were no longer used. */ /* Revision 1.2 1996/03/26 19:34:33 jaf */ /* Added comments indicating which constants are not needed in an */ /* application that uses the LPC-10 coder. */ /* Revision 1.1 1996/02/07 14:43:51 jaf */ /* Initial revision */ /* LPC Configuration parameters: */ /* Frame size, Prediction order, Pitch period */ /* Local variables that need not be saved */ /* Uncoded speech parameters */ /* Coded speech parameters */ /* Local state */ /* None */ /* Parameter adjustments */ if (speech) { --speech; } if (bits) { --bits; } /* Function Body */ prepro_(&speech[1], &c__180, st); analys_(&speech[1], voice, &pitch, &rms, rc, st); encode_(voice, &pitch, &rms, rc, &ipitv, &irms, irc); chanwr_(&c__10, &ipitv, &irms, irc, &bits[1], st); return 0; } /* lpcenc_ */
/* Subroutine */ int lpc10_encode(real *speech, integer *bits, struct lpc10_encoder_state *st) { integer irms, voice[2], pitch, ipitv; real rc[10]; extern /* Subroutine */ int encode_(integer *, integer *, real *, real *, integer *, integer *, integer *), chanwr_(integer *, integer *, integer *, integer *, integer *, struct lpc10_encoder_state *), analys_(real *, integer *, integer *, real *, real *, struct lpc10_encoder_state *), prepro_(real *, integer *, struct lpc10_encoder_state *); integer irc[10]; real rms; /* Arguments */ /* $Log: lpcenc.c,v $ /* Revision 1.2 2006/08/01 13:06:50 rjongbloed /* Added a raft of unvalidated audio codecs from OpenH323 tree /* /* Revision 1.1.2.1 2006/07/22 14:03:17 rjongbloed /* Added more plug ins /* /* Revision 1.1.2.1 2006/05/08 13:49:57 rjongbloed /* Imported all the audio codec plug ins from OpenH323 /* /* Revision 1.1 2004/05/04 11:16:43 csoutheren /* Initial version /* /* Revision 1.1 2000/06/05 04:45:12 robertj /* Added LPC-10 2400bps codec /* * Revision 1.2 1996/08/20 20:31:21 jaf * Removed all static local variables that were SAVE'd in the Fortran * code, and put them in struct lpc10_encoder_state that is passed as an * argument. * * Removed init function, since all initialization is now done in * init_lpc10_encoder_state(). * * Changed name of function from lpcenc_ to lpc10_encode, simply to make * all lpc10 functions have more consistent naming with each other. * * Revision 1.1 1996/08/19 22:31:44 jaf * Initial revision * */ /* Revision 1.3 1996/03/29 22:03:47 jaf */ /* Removed definitions for any constants that were no longer used. */ /* Revision 1.2 1996/03/26 19:34:33 jaf */ /* Added comments indicating which constants are not needed in an */ /* application that uses the LPC-10 coder. */ /* Revision 1.1 1996/02/07 14:43:51 jaf */ /* Initial revision */ /* LPC Configuration parameters: */ /* Frame size, Prediction order, Pitch period */ /* Local variables that need not be saved */ /* Uncoded speech parameters */ /* Coded speech parameters */ /* Local state */ /* None */ /* Parameter adjustments */ if (speech) { --speech; } if (bits) { --bits; } /* Function Body */ prepro_(&speech[1], &c__180, st); analys_(&speech[1], voice, &pitch, &rms, rc, st); encode_(voice, &pitch, &rms, rc, &ipitv, &irms, irc); chanwr_(&c__10, &ipitv, &irms, irc, &bits[1], st); return 0; } /* lpcenc_ */