fprintf(stderr, "\nCodec2 - 2400 bit/s speech codec - Simulation Program\n"
"\thttp://rowetel.com/codec2.html\n\n"
"usage: %s InputFile [-o OutputFile]\n"
- "\t[-o lpc Order]\n"
+ "\t[--lpc Order]\n"
"\t[--lsp]\n"
"\t[--phase0]\n"
"\t[--postfilter]\n"
E += ak[i]*R[i];
roots = lpc_to_lsp(ak, order, lsp, 5, LSP_DELTA1);
- assert(roots == order);
+ if (roots != order) {
+ /* for some reason LSP roots could not be found */
+ /* some alpha testers are reporting this condition */
+ fprintf(stderr, "LSP roots not found!\nroots = %d\n", roots);
+ for(i=0; i<=order; i++)
+ fprintf(stderr, "a[%d] = %f\n", i, ak[i]);
+
+ /* some benign LSP values we can use instead */
+ for(i=0; i<order; i++)
+ lsp[i] = (PI/order)*(float)i;
+ }
return E;
}