172{
173
174
177
178
181
182
184 integer nout, ivuv[16], i__, j;
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366 if (voice) {
367 --voice;
368 }
369 if (rc) {
370 --rc;
371 }
372 if (speech) {
373 --speech;
374 }
375
376
379
380
381 i__1 =
min(*pitch,156);
382 *pitch =
max(i__1,20);
384 for (i__ = 1; i__ <= i__1; ++i__) {
385
386
387 r__2 = rc[i__];
388 r__1 =
min(r__2,.99f);
389 rc[i__] =
max(r__1,-.99f);
390 }
392 ivuv, ipiti, rmsi, rci, &nout, &ratio, st);
393 if (nout > 0) {
394 i__1 = nout;
395 for (j = 1; j <= i__1; ++j) {
396
397
398
399
400
402 bsynz_(pc, &ipiti[j - 1], &ivuv[j - 1], &
buf[*buflen], &rmsi[j - 1]
403 , &ratio, &g2pass, st);
404 deemp_(&
buf[*buflen], &ipiti[j - 1], st);
405 *buflen += ipiti[j - 1];
406 }
407
408
409
410
411
412
413
414 for (i__ = 1; i__ <= 180; ++i__) {
415 speech[i__] =
buf[i__ - 1] / 4096.f;
416 }
417 *k = 180;
418 *buflen += -180;
419 i__1 = *buflen;
420 for (i__ = 1; i__ <= i__1; ++i__) {
421 buf[i__ - 1] =
buf[i__ + 179];
422 }
423 }
424 return 0;
425}
int bsynz_(real *coef, integer *ip, integer *iv, real *sout, real *rms, real *ratio, real *g2pass, struct lpc10_decoder_state *st)
int deemp_(real *x, integer *n, struct lpc10_decoder_state *st)
int irc2pc_(real *rc, real *pc, integer *order, real *gprime, real *g2pass)
int pitsyn_(integer *order, integer *voice, integer *pitch, real *rms, real *rc, integer *lframe, integer *ivuv, integer *ipiti, real *rmsi, real *rci, integer *nout, real *ratio, struct lpc10_decoder_state *st)