Lines Matching full:lpc
1 /* libSoX lpc-10 format.
123 priv_t * lpc = (priv_t *)ft->priv; in startread() local
125 if ((lpc->decst = create_lpc10_decoder_state()) == NULL) { in startread()
129 lpc->samples = LPC10_SAMPLES_PER_FRAME; in startread()
135 priv_t * lpc = (priv_t *)ft->priv; in startwrite() local
137 if ((lpc->encst = create_lpc10_encoder_state()) == NULL) { in startwrite()
141 lpc->samples = 0; in startwrite()
148 priv_t * lpc = (priv_t *)ft->priv; in read_samples() local
154 if (lpc->samples == LPC10_SAMPLES_PER_FRAME) { in read_samples()
160 lpc10_decode(bits, lpc->speech, lpc->decst); in read_samples()
161 lpc->samples = 0; in read_samples()
164 while (nread < len && lpc->samples < LPC10_SAMPLES_PER_FRAME) in read_samples()
165 buf[nread++] = SOX_FLOAT_32BIT_TO_SAMPLE(lpc->speech[lpc->samples++], ft->clips); in read_samples()
173 priv_t * lpc = (priv_t *)ft->priv; in write_samples() local
177 while (len > 0 && lpc->samples < LPC10_SAMPLES_PER_FRAME) { in write_samples()
179 lpc->speech[lpc->samples++] = SOX_SAMPLE_TO_FLOAT_32BIT(buf[nwritten++], ft->clips); in write_samples()
183 if (lpc->samples == LPC10_SAMPLES_PER_FRAME) { in write_samples()
186 lpc10_encode(lpc->speech, bits, lpc->encst); in write_samples()
188 lpc->samples = 0; in write_samples()
197 priv_t * lpc = (priv_t *)ft->priv; in stopread() local
199 free(lpc->decst); in stopread()
206 priv_t * lpc = (priv_t *)ft->priv; in stopwrite() local
208 free(lpc->encst); in stopwrite()
215 static char const * const names[] = {"lpc10", "lpc", NULL}; in LSX_FORMAT_HANDLER()