void speex_preprocess_state_destroy(SpeexPreprocessState *st) { speex_free(st->frame); speex_free(st->ps); speex_free(st->gain2); speex_free(st->window); speex_free(st->noise); speex_free(st->reverb_estimate); speex_free(st->old_ps); speex_free(st->gain); speex_free(st->prior); speex_free(st->post); speex_free(st->loudness_weight); speex_free(st->echo_noise); speex_free(st->S); speex_free(st->Smin); speex_free(st->Stmp); speex_free(st->update_prob); speex_free(st->zeta); speex_free(st->noise_bands); speex_free(st->noise_bands2); speex_free(st->speech_bands); speex_free(st->speech_bands2); speex_free(st->inbuf); speex_free(st->outbuf); spx_drft_clear(st->fft_lookup); speex_free(st->fft_lookup); speex_free(st); }
/** Destroys an echo canceller state */ void speex_echo_state_destroy(SpeexEchoState *st) { spx_drft_clear(st->fft_lookup); speex_free(st->fft_lookup); speex_free(st->x); speex_free(st->d); speex_free(st->y); speex_free(st->last_y); speex_free(st->Yps); speex_free(st->Yf); speex_free(st->Rf); speex_free(st->Xf); speex_free(st->fratio); speex_free(st->regul); speex_free(st->X); speex_free(st->D); speex_free(st->Y); speex_free(st->E); speex_free(st->W); speex_free(st->PHI); speex_free(st->power); speex_free(st->power_1); speex_free(st->grad); speex_free(st); }
void vorbis_psy_destroy(VorbisPsy *p) { if(p){ spx_drft_clear(&p->lookup); if(p->bark) speex_free(p->bark); if(p->noiseoffset) speex_free(p->noiseoffset); if(p->window) speex_free(p->window); memset(p,0,sizeof(*p)); speex_free(p); } }