4 Revision 1.11 2000/01/05 08:20:39 markster
5 Version 0.1.12 from FTP
7 Revision 1.2 2000/01/05 08:20:39 markster
8 Some OSS fixes and a few lpc changes to make it actually work
10 * Revision 1.2 1996/08/20 20:41:32 jaf
11 * Removed all static local variables that were SAVE'd in the Fortran
12 * code, and put them in struct lpc10_decoder_state that is passed as an
15 * Removed init function, since all initialization is now done in
16 * init_lpc10_decoder_state().
18 * Revision 1.1 1996/08/19 22:30:49 jaf
24 #ifdef P_R_O_T_O_T_Y_P_E_S
25 extern integer random_(struct lpc10_decoder_state *st);
28 /* -- translated by f2c (version 19951025).
29 You must link the resulting object file with the libraries:
30 -lf2c -lm (in that order)
35 /* ********************************************************************** */
37 /* RANDOM Version 49 */
40 * Revision 1.11 2000/01/05 08:20:39 markster
41 * Version 0.1.12 from FTP
43 /* Revision 1.2 2000/01/05 08:20:39 markster
44 /* Some OSS fixes and a few lpc changes to make it actually work
46 * Revision 1.2 1996/08/20 20:41:32 jaf
47 * Removed all static local variables that were SAVE'd in the Fortran
48 * code, and put them in struct lpc10_decoder_state that is passed as an
51 * Removed init function, since all initialization is now done in
52 * init_lpc10_decoder_state().
54 * Revision 1.1 1996/08/19 22:30:49 jaf
57 /* Revision 1.3 1996/03/20 16:13:54 jaf */
58 /* Rearranged comments a little bit, and added comments explaining that */
59 /* even though there is local state here, there is no need to create an */
60 /* ENTRY for reinitializing it. */
62 /* Revision 1.2 1996/03/14 22:25:29 jaf */
63 /* Just rearranged the comments and local variable declarations a bit. */
65 /* Revision 1.1 1996/02/07 14:49:01 jaf */
66 /* Initial revision */
69 /* ********************************************************************* */
71 /* Pseudo random number generator based on Knuth, Vol 2, p. 27. */
73 /* Function Return: */
74 /* RANDOM - Integer variable, uniformly distributed over -32768 to 32767 */
76 /* This subroutine maintains local state from one call to the next. */
77 /* In the context of the LPC10 coder, there is no reason to reinitialize */
78 /* this local state when switching between audio streams, because its */
79 /* results are only used to generate noise for unvoiced frames. */
81 integer random_(struct lpc10_decoder_state *st)
83 /* Initialized data */
89 /* System generated locals */
92 /* Parameters/constants */
94 /* The following is a 16 bit 2's complement addition, */
95 /* with overflow checking disabled */
101 y[*k - 1] += y[*j - 1];