⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 synths.c

📁 sloedgy open sip stack source code
💻 C
📖 第 1 页 / 共 2 页
字号:
/*

$Log: synths.c,v $
Revision 1.1  2006/06/26 03:02:55  joegenbaclor
I have decided to include the latest development realease  of OPAL tagged Deimos Devel 1 (June 8 2006) as inegrated classes to opensipstack to avoid future version conflicts due to the fast pace in OPAL development.   This move is also aimed to reduce the size of projects using OPAL componets such as the soon to be relased OpenSIPPhone.

Revision 2.4  2006/01/02 14:46:40  dsandras
Another try to remove inline comments in the ChangeLog.

Revision 2.3  2006/01/02 11:27:29  dsandras
Fixed warnings.

Revision 2.2  2005/08/08 03:28:42  dereksmithies
Eradicate all "/ * within comments" messages from GCC compilations.

Revision 2.1  2003/03/14 09:53:27  robertj
Updated to openH323 v1.11.7

Revision 1.1  2000/06/05 04:45:12  robertj
Added LPC-10 2400bps codec

 * Revision 1.2  1996/08/20  20:42:59  jaf
 * Removed all static local variables that were SAVE'd in the Fortran
 * code, and put them in struct lpc10_decoder_state that is passed as an
 * argument.
 *
 * Removed init function, since all initialization is now done in
 * init_lpc10_decoder_state().
 *
 * Revision 1.1  1996/08/19  22:30:33  jaf
 * Initial revision
 *

*/

#ifdef P_R_O_T_O_T_Y_P_E_S
extern int synths_(integer *voice, integer *pitch, real *rms, real *rc, real *speech, integer *k, struct lpc10_decoder_state *st);
/* comlen contrl_ 12 */
/*:ref: pitsyn_ 14 12 4 4 4 6 6 4 4 4 6 6 4 6 */
/*:ref: irc2pc_ 14 5 6 6 4 6 6 */
/*:ref: bsynz_ 14 7 6 4 4 6 6 6 6 */
/*:ref: deemp_ 14 2 6 4 */
/*:ref: initpitsyn_ 14 0 */
/*:ref: initbsynz_ 14 0 */
/*:ref: initdeemp_ 14 0 */
#endif

/*  -- translated by f2c (version 19951025).
   You must link the resulting object file with the libraries:
	-lf2c -lm   (in that order)
*/

#include "f2c.h"

/* Common Block Declarations */

extern struct {
    integer order, lframe;
    logical corrp;
} contrl_;

#define contrl_1 contrl_

/* Table of constant values */

static real c_b2 = .7f;

/* ***************************************************************** */

/* 	SYNTHS Version 54 

 * $Log: synths.c,v $
 * Revision 1.1  2006/06/26 03:02:55  joegenbaclor
 * I have decided to include the latest development realease  of OPAL tagged Deimos Devel 1 (June 8 2006) as inegrated classes to opensipstack to avoid future version conflicts due to the fast pace in OPAL development.   This move is also aimed to reduce the size of projects using OPAL componets such as the soon to be relased OpenSIPPhone.
 *
 * Revision 2.4  2006/01/02 14:46:40  dsandras
 * Another try to remove inline comments in the ChangeLog.
 *
 * Revision 2.3  2006/01/02 11:27:29  dsandras
 * Fixed warnings.
 *
 * Revision 2.2  2005/08/08 03:28:42  dereksmithies
 * Eradicate all "/ * within comments" messages from GCC compilations.
 *
 * Revision 2.1  2003/03/14 09:53:27  robertj
 * Updated to openH323 v1.11.7
 *
 * Revision 1.1  2000/06/05 04:45:12  robertj
 * Added LPC-10 2400bps codec
 *
 * Revision 1.2  1996/08/20  20:42:59  jaf
 * Removed all static local variables that were SAVE'd in the Fortran
 * code, and put them in struct lpc10_decoder_state that is passed as an
 * argument.
 *
 * Removed init function, since all initialization is now done in
 * init_lpc10_decoder_state().
 *
 * Revision 1.1  1996/08/19  22:30:33  jaf
 * Initial revision
 * */
/* Revision 1.5  1996/03/26  19:31:58  jaf */
/* Commented out trace statements. */

/* Revision 1.4  1996/03/25  19:41:01  jaf */
/* Changed so that MAXFRM samples are always returned in the output array */
/* SPEECH. */

/* This required delaying the returned samples by MAXFRM sample times, */
/* and remembering any "left over" samples returned by PITSYN from one */
/* call of SYNTHS to the next. */

/* Changed size of SPEECH from 2*MAXFRM to MAXFRM.  Removed local */
/* variable SOUT.  Added local state variables BUF and BUFLEN. */

/* Revision 1.3  1996/03/25  19:20:10  jaf */
/* Added comments about the range of possible return values for argument */
/* K, and increased the size of the arrays filled in by PITSYN from 11 to */
/* 16, as has been already done inside of PITSYN. */

/* Revision 1.2  1996/03/22  00:18:18  jaf */
/* Added comments explaining meanings of input and output parameters, and */
/* indicating which array indices can be read or written. */

/* Added entry INITSYNTHS, which does nothing except call the */
/* corresponding initialization entries for subroutines PITSYN, BSYNZ, */
/* and DEEMP. */

/* Revision 1.1  1996/02/07 14:49:44  jaf */
/* Initial revision */


/* ***************************************************************** */

/* The note below is from the distributed version of the LPC10 coder. */
/* The version of the code below has been modified so that SYNTHS always */
/* has a constant frame length output of MAXFRM. */

/* Also, BSYNZ and DEEMP need not be modified to work on variable */
/* positions within an array.  It is only necessary to pass the first */
/* index desired as the array argument.  What actually gets passed is the */
/* address of that array position, which the subroutine treats as the */
/* first index of the array. */

/* This technique is used in subroutine ANALYS when calling PREEMP, so it */
/* appears that multiple people wrote different parts of this LPC10 code, */
/* and that they didn't necessarily have equivalent knowledge of Fortran */
/* (not surprising). */

/*  NOTE: There is excessive buffering here, BSYNZ and DEEMP should be */
/*        changed to operate on variable positions within SOUT.  Also, */
/*        the output length parameter is bogus, and PITSYN should be */
/*        rewritten to allow a constant frame length output. */

/* Input: */
/*  VOICE  - Half frame voicing decisions */
/*           Indices 1 through 2 read. */
/* Input/Output: */
/*  PITCH  - Pitch */
/*           PITCH is restricted to range 20 to 156, inclusive, */
/*           before calling subroutine PITSYN, and then PITSYN */
/*           can modify it further under some conditions. */
/*  RMS    - Energy */
/*           Only use is for debugging, and passed to PITSYN. */
/*           See comments there for how it can be modified. */
/*  RC     - Reflection coefficients */
/*           Indices 1 through ORDER restricted to range -.99 to .99, */
/*           before calling subroutine PITSYN, and then PITSYN */
/*           can modify it further under some conditions. */
/* Output: */
/*  SPEECH - Synthesized speech samples. */
/*           Indices 1 through the final value of K are written. */
/*  K      - Number of samples placed into array SPEECH. */
/*           This is always MAXFRM. */

/* Subroutine */ int synths_(integer *voice, integer *pitch, real *
	rms, real *rc, real *speech, integer *k, struct lpc10_decoder_state *st)
{
    /* Initialized data */

    real *buf;
    integer *buflen;

    /* System generated locals */
    integer i__1;
    real r__1, r__2;

    /* Local variables */
    real rmsi[16];
    integer nout, ivuv[16], i__, j;
    extern /* Subroutine */ int deemp_(real *, integer *, struct lpc10_decoder_state *);
    real ratio;
    integer ipiti[16];
    extern /* Subroutine */ int bsynz_(real *, integer *, 
	    integer *, real *, real *, real *, real *, struct lpc10_decoder_state *), irc2pc_(real *, real *
	    , integer *, real *, real *);
    real g2pass;
    real pc[10];
    extern /* Subroutine */ int pitsyn_(integer *, integer *, integer *, real 
	    *, real *, integer *, integer *, integer *, real *, real *, 
	    integer *, real *, struct lpc10_decoder_state *);
    real rci[160]	/* was [10][16] */;

/* 
 * 
 * $Log: synths.c,v $
 * Revision 1.1  2006/06/26 03:02:55  joegenbaclor
 * I have decided to include the latest development realease  of OPAL tagged Deimos Devel 1 (June 8 2006) as inegrated classes to opensipstack to avoid future version conflicts due to the fast pace in OPAL development.   This move is also aimed to reduce the size of projects using OPAL componets such as the soon to be relased OpenSIPPhone.
 *
 * Revision 2.4  2006/01/02 14:46:40  dsandras
 * Another try to remove inline comments in the ChangeLog.
 *
 * Revision 2.3  2006/01/02 11:27:29  dsandras
 * Fixed warnings.
 * 
 * Revision 2.2  2005/08/08 03:28:42  dereksmithies
 * Eradicate all "/ * within comments" messages from GCC compilations.
 *
 * Revision 2.1  2003/03/14 09:53:27  robertj
 * Updated to openH323 v1.11.7
 *
 * Revision 1.1  2000/06/05 04:45:12  robertj

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -