From: dttsp Date: Fri, 3 Jun 2005 19:41:57 +0000 (+0000) Subject: Fixed real buffer deallocation, speech processor allocation blunder X-Git-Url: https://git.rkrishnan.org/pf/content/en/footer/frontends/vdrive?a=commitdiff_plain;h=0d35cdb7e67aa8d030cd5e449e6b518ff60ec721;p=dttsp.git Fixed real buffer deallocation, speech processor allocation blunder --- diff --git a/jDttSP/bufvec.c b/jDttSP/bufvec.c index 606992b..a027b4c 100644 --- a/jDttSP/bufvec.c +++ b/jDttSP/bufvec.c @@ -127,7 +127,7 @@ newRLB(int size, REAL *base, char *tag) { void delRLB(RLB p) { if (p) { - delvec_REAL(RLBbase(p)); + if (p->mine) delvec_REAL(RLBbase(p)); free((char *) p); } } diff --git a/jDttSP/speechproc.c b/jDttSP/speechproc.c index 2d31126..90c0b00 100644 --- a/jDttSP/speechproc.c +++ b/jDttSP/speechproc.c @@ -37,7 +37,7 @@ Bridgewater, NJ 08807 SpeechProc newSpeechProc(REAL K, REAL MaxCompression, COMPLEX *spdat, int size) { SpeechProc sp = (SpeechProc) safealloc(1, sizeof(speech_proc), "new speech processor"); - sp->CG = newRLB(size, NULL, "CG buffer in Speech Processor"); + sp->CG = newRLB(size + 1, NULL, "CG buffer in Speech Processor"); sp->K = K; sp->MaxGain = pow(10.0, MaxCompression * 0.05); sp->LastCG = 1.0;