Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/speexdsp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>2002-10-27 05:59:00 +0300
committerjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>2002-10-27 05:59:00 +0300
commit5d10b870feac6786f96089f87e3edd25c9df934d (patch)
tree8ac3a0dc247af74bce24ad22bc9b8e620151ef3f
parentf895cd69119f3da82cc27f4cd4efbcfc4c40c479 (diff)
The temp stack is now void* instead of float*
git-svn-id: http://svn.xiph.org/trunk/speex@4059 0101bb08-14d6-0310-b084-bc0e0c8e3800
-rw-r--r--libspeex/cb_search.c8
-rw-r--r--libspeex/cb_search.h8
-rw-r--r--libspeex/filters.c4
-rw-r--r--libspeex/filters.h4
-rw-r--r--libspeex/lsp.c4
-rw-r--r--libspeex/lsp.h56
-rw-r--r--libspeex/ltp.c12
-rw-r--r--libspeex/ltp.h12
-rw-r--r--libspeex/modes.h58
-rw-r--r--libspeex/nb_celp.c6
-rw-r--r--libspeex/nb_celp.h4
-rw-r--r--libspeex/sb_celp.c6
-rw-r--r--libspeex/sb_celp.h4
-rw-r--r--libspeex/stack_alloc.h6
-rw-r--r--libspeex/testenc_wb.c1
15 files changed, 97 insertions, 96 deletions
diff --git a/libspeex/cb_search.c b/libspeex/cb_search.c
index f93ce31..568632b 100644
--- a/libspeex/cb_search.c
+++ b/libspeex/cb_search.c
@@ -48,7 +48,7 @@ int nsf, /* number of samples in subframe */
float *exc,
float *r,
SpeexBits *bits,
-float *stack,
+void *stack,
int complexity
)
{
@@ -309,7 +309,7 @@ float *exc,
void *par, /* non-overlapping codebook */
int nsf, /* number of samples in subframe */
SpeexBits *bits,
-float *stack
+void *stack
)
{
int i,j;
@@ -360,7 +360,7 @@ int nsf, /* number of samples in subframe */
float *exc,
float *r,
SpeexBits *bits,
-float *stack,
+void *stack,
int complexity
)
{
@@ -381,7 +381,7 @@ float *exc,
void *par, /* non-overlapping codebook */
int nsf, /* number of samples in subframe */
SpeexBits *bits,
-float *stack
+void *stack
)
{
int i;
diff --git a/libspeex/cb_search.h b/libspeex/cb_search.h
index a2b8512..bbfc6e4 100644
--- a/libspeex/cb_search.h
+++ b/libspeex/cb_search.h
@@ -55,7 +55,7 @@ int nsf, /* number of samples in subframe */
float *exc,
float *r,
SpeexBits *bits,
-float *stack,
+void *stack,
int complexity
);
@@ -64,7 +64,7 @@ float *exc,
void *par, /* non-overlapping codebook */
int nsf, /* number of samples in subframe */
SpeexBits *bits,
-float *stack
+void *stack
);
@@ -79,7 +79,7 @@ int nsf, /* number of samples in subframe */
float *exc,
float *r,
SpeexBits *bits,
-float *stack,
+void *stack,
int complexity
);
@@ -89,7 +89,7 @@ float *exc,
void *par, /* non-overlapping codebook */
int nsf, /* number of samples in subframe */
SpeexBits *bits,
-float *stack
+void *stack
);
#endif
diff --git a/libspeex/filters.c b/libspeex/filters.c
index 72628a5..f3ada0e 100644
--- a/libspeex/filters.c
+++ b/libspeex/filters.c
@@ -107,7 +107,7 @@ void fir_mem2(float *x, float *num, float *y, int N, int ord, float *mem)
}
}
-void syn_percep_zero(float *xx, float *ak, float *awk1, float *awk2, float *y, int N, int ord, float *stack)
+void syn_percep_zero(float *xx, float *ak, float *awk1, float *awk2, float *y, int N, int ord, void *stack)
{
int i;
float *mem = PUSH(stack,ord, float);
@@ -119,7 +119,7 @@ void syn_percep_zero(float *xx, float *ak, float *awk1, float *awk2, float *y, i
iir_mem2(y, awk2, y, N, ord, mem);
}
-void residue_percep_zero(float *xx, float *ak, float *awk1, float *awk2, float *y, int N, int ord, float *stack)
+void residue_percep_zero(float *xx, float *ak, float *awk1, float *awk2, float *y, int N, int ord, void *stack)
{
int i;
float *mem = PUSH(stack,ord, float);
diff --git a/libspeex/filters.h b/libspeex/filters.h
index 802a961..7a6b9c2 100644
--- a/libspeex/filters.h
+++ b/libspeex/filters.h
@@ -50,9 +50,9 @@ void bw_lpc(float gamma, float *lpc_in, float *lpc_out, int order);
/* FIR filter */
void fir_decim_mem(float *x, float *a, float *y, int N, int M, float *mem);
-void syn_percep_zero(float *x, float *ak, float *awk1, float *awk2, float *y, int N, int ord, float *stack);
+void syn_percep_zero(float *x, float *ak, float *awk1, float *awk2, float *y, int N, int ord, void *stack);
-void residue_percep_zero(float *xx, float *ak, float *awk1, float *awk2, float *y, int N, int ord, float *stack);
+void residue_percep_zero(float *xx, float *ak, float *awk1, float *awk2, float *y, int N, int ord, void *stack);
void comb_filter(
float *exc, /*decoded excitation*/
diff --git a/libspeex/lsp.c b/libspeex/lsp.c
index 182214a..48420df 100644
--- a/libspeex/lsp.c
+++ b/libspeex/lsp.c
@@ -111,7 +111,7 @@ float cheb_poly_eva(float *coef,float x,int m,float *stack)
\*---------------------------------------------------------------------------*/
-int lpc_to_lsp (float *a,int lpcrdr,float *freq,int nb,float delta, float *stack)
+int lpc_to_lsp (float *a,int lpcrdr,float *freq,int nb,float delta, void *stack)
/* float *a lpc coefficients */
/* int lpcrdr order of LPC coefficients (10) */
/* float *freq LSP frequencies in the x domain */
@@ -247,7 +247,7 @@ int lpc_to_lsp (float *a,int lpcrdr,float *freq,int nb,float delta, float *stack
\*---------------------------------------------------------------------------*/
-void lsp_to_lpc(float *freq,float *ak,int lpcrdr, float *stack)
+void lsp_to_lpc(float *freq,float *ak,int lpcrdr, void *stack)
/* float *freq array of LSP frequencies in the x domain */
/* float *ak array of LPC coefficients */
/* int lpcrdr order of LPC coefficients */
diff --git a/libspeex/lsp.h b/libspeex/lsp.h
index c3b7697..58ca4e4 100644
--- a/libspeex/lsp.h
+++ b/libspeex/lsp.h
@@ -16,39 +16,39 @@ Modified by Jean-Marc Valin
\*---------------------------------------------------------------------------*/
/* Speex License:
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- - Neither the name of the Xiph.org Foundation nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ - Neither the name of the Xiph.org Foundation nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __AK2LSPD__
#define __AK2LSPD__
-int lpc_to_lsp (float *a, int lpcrdr, float *freq, int nb, float delta, float *stack);
-void lsp_to_lpc(float *freq, float *ak, int lpcrdr, float *stack);
+int lpc_to_lsp (float *a, int lpcrdr, float *freq, int nb, float delta, void *stack);
+void lsp_to_lpc(float *freq, float *ak, int lpcrdr, void *stack);
/*Added by JMV*/
void lsp_enforce_margin(float *lsp, int len, float margin);
diff --git a/libspeex/ltp.c b/libspeex/ltp.c
index a6d26a7..1ce5fae 100644
--- a/libspeex/ltp.c
+++ b/libspeex/ltp.c
@@ -68,7 +68,7 @@ static float inner_prod(float *x, float *y, int len)
*/
-void open_loop_nbest_pitch(float *sw, int start, int end, int len, int *pitch, float *gain, int N, float *stack)
+void open_loop_nbest_pitch(float *sw, int start, int end, int len, int *pitch, float *gain, int N, void *stack)
{
int i,j,k;
/*float corr=0;*/
@@ -152,7 +152,7 @@ int pitch, /* Pitch value */
int p, /* Number of LPC coeffs */
int nsf, /* Number of samples in subframe */
SpeexBits *bits,
-float *stack,
+void *stack,
float *exc2,
float *r,
int *cdbk_index
@@ -338,7 +338,7 @@ float pitch_coef, /* Voicing (pitch) coefficient */
int p, /* Number of LPC coeffs */
int nsf, /* Number of samples in subframe */
SpeexBits *bits,
-float *stack,
+void *stack,
float *exc2,
float *r,
int complexity
@@ -414,7 +414,7 @@ int nsf, /* Number of samples in subframe */
int *pitch_val,
float *gain_val,
SpeexBits *bits,
-float *stack,
+void *stack,
int lost)
{
int i;
@@ -518,7 +518,7 @@ float pitch_coef, /* Voicing (pitch) coefficient */
int p, /* Number of LPC coeffs */
int nsf, /* Number of samples in subframe */
SpeexBits *bits,
-float *stack,
+void *stack,
float *exc2,
float *r,
int complexity
@@ -545,7 +545,7 @@ int nsf, /* Number of samples in subframe */
int *pitch_val,
float *gain_val,
SpeexBits *bits,
-float *stack,
+void *stack,
int lost)
{
int i;
diff --git a/libspeex/ltp.h b/libspeex/ltp.h
index 819f240..492e107 100644
--- a/libspeex/ltp.h
+++ b/libspeex/ltp.h
@@ -40,7 +40,7 @@ typedef struct ltp_params {
} ltp_params;
-void open_loop_nbest_pitch(float *sw, int start, int end, int len, int *pitch, float *gain, int N, float *stack);
+void open_loop_nbest_pitch(float *sw, int start, int end, int len, int *pitch, float *gain, int N, void *stack);
/** Finds the best quantized 3-tap pitch predictor by analysis by synthesis */
@@ -58,7 +58,7 @@ float pitch_coef, /* Voicing (pitch) coefficient */
int p, /* Number of LPC coeffs */
int nsf, /* Number of samples in subframe */
SpeexBits *bits,
-float *stack,
+void *stack,
float *exc2,
float *r,
int complexity
@@ -75,7 +75,7 @@ int nsf, /* Number of samples in subframe */
int *pitch_val,
float *gain_val,
SpeexBits *bits,
-float *stack,
+void *stack,
int lost
);
@@ -90,7 +90,7 @@ int pitch, /* Pitch value */
int p, /* Number of LPC coeffs */
int nsf, /* Number of samples in subframe */
SpeexBits *bits,
-float *stack,
+void *stack,
float *exc2,
float *r,
int *cdbk_index
@@ -112,7 +112,7 @@ float pitch_coef, /* Voicing (pitch) coefficient */
int p, /* Number of LPC coeffs */
int nsf, /* Number of samples in subframe */
SpeexBits *bits,
-float *stack,
+void *stack,
float *exc2,
float *r,
int complexity
@@ -129,5 +129,5 @@ int nsf, /* Number of samples in subframe */
int *pitch_val,
float *gain_val,
SpeexBits *bits,
-float *stack,
+void *stack,
int lost);
diff --git a/libspeex/modes.h b/libspeex/modes.h
index 59874b3..0404cc7 100644
--- a/libspeex/modes.h
+++ b/libspeex/modes.h
@@ -57,26 +57,26 @@ typedef void (*lsp_unquant_func)(float *, int, SpeexBits *);
/** Long-term predictor quantization */
typedef int (*ltp_quant_func)(float *, float *, float *, float *,
float *, float *, void *, int, int, float,
- int, int, SpeexBits*, float *, float *, float *, int);
+ int, int, SpeexBits*, void *, float *, float *, int);
/** Long-term un-quantize */
typedef void (*ltp_unquant_func)(float *, int, int, float, void *, int, int *,
- float *, SpeexBits*, float*, int);
+ float *, SpeexBits*, void*, int);
/** Innovation quantization function */
typedef void (*innovation_quant_func)(float *, float *, float *, float *, void *, int, int,
- float *, float *, SpeexBits *, float *, int);
+ float *, float *, SpeexBits *, void *, int);
/** Innovation unquantization function */
-typedef void (*innovation_unquant_func)(float *, void *, int, SpeexBits*, float *);
+typedef void (*innovation_unquant_func)(float *, void *, int, SpeexBits*, void *);
/** Description of a Speex sub-mode (wither narrowband or wideband */
typedef struct SpeexSubmode {
- int lbr_pitch; /**< Set to -1 for "normal" modes, otherwise encode pitch using a global pitch and allowing a +- lbr_pitch variation (for low not-rates)*/
- int forced_pitch_gain; /**< Use the same (forced) pitch gain for all sub-frames */
+ int lbr_pitch; /**< Set to -1 for "normal" modes, otherwise encode pitch using a global pitch and allowing a +- lbr_pitch variation (for low not-rates)*/
+ int forced_pitch_gain; /**< Use the same (forced) pitch gain for all sub-frames */
int have_subframe_gain; /**< Number of bits to use as sub-frame innovation gain */
- int double_codebook; /**< Apply innovation quantization twice for higher quality (and higher bit-rate)*/
+ int double_codebook; /**< Apply innovation quantization twice for higher quality (and higher bit-rate)*/
/*LSP functions*/
lsp_quant_func lsp_quant; /**< LSP quantization function */
lsp_unquant_func lsp_unquant; /**< LSP unquantization function */
@@ -101,18 +101,18 @@ typedef struct SpeexSubmode {
/** Struct defining the encoding/decoding mode*/
typedef struct SpeexNBMode {
- int frameSize; /**< Size of frames used for encoding */
- int subframeSize; /**< Size of sub-frames used for encoding */
- int lpcSize; /**< Order of LPC filter */
- int bufSize; /**< Size of signal buffer to use in encoder */
- int pitchStart; /**< Smallest pitch value allowed */
- int pitchEnd; /**< Largest pitch value allowed */
-
- float gamma1; /**< Perceptual filter parameter #1 */
- float gamma2; /**< Perceptual filter parameter #2 */
- float lag_factor; /**< Lag-windowing parameter */
- float lpc_floor; /**< Noise floor for LPC analysis */
- float preemph; /**< Pre-emphasis */
+ int frameSize; /**< Size of frames used for encoding */
+ int subframeSize; /**< Size of sub-frames used for encoding */
+ int lpcSize; /**< Order of LPC filter */
+ int bufSize; /**< Size of signal buffer to use in encoder */
+ int pitchStart; /**< Smallest pitch value allowed */
+ int pitchEnd; /**< Largest pitch value allowed */
+
+ float gamma1; /**< Perceptual filter parameter #1 */
+ float gamma2; /**< Perceptual filter parameter #2 */
+ float lag_factor; /**< Lag-windowing parameter */
+ float lpc_floor; /**< Noise floor for LPC analysis */
+ float preemph; /**< Pre-emphasis */
SpeexSubmode *submodes[NB_SUBMODES]; /**< Sub-mode data for the mode */
int defaultSubmode; /**< Default sub-mode to use when encoding */
@@ -122,16 +122,16 @@ typedef struct SpeexNBMode {
/** Struct defining the encoding/decoding mode for SB-CELP (wideband) */
typedef struct SpeexSBMode {
- SpeexMode *nb_mode; /**< Embedded narrowband mode */
- int frameSize; /**< Size of frames used for encoding */
- int subframeSize; /**< Size of sub-frames used for encoding */
- int lpcSize; /**< Order of LPC filter */
- int bufSize; /**< Signal buffer size in encoder */
- float gamma1; /**< Perceptual filter parameter #1 */
- float gamma2; /**< Perceptual filter parameter #1 */
- float lag_factor; /**< Lag-windowing parameter */
- float lpc_floor; /**< Noise floor for LPC analysis */
- float preemph; /**< Pre-emphasis */
+ SpeexMode *nb_mode; /**< Embedded narrowband mode */
+ int frameSize; /**< Size of frames used for encoding */
+ int subframeSize; /**< Size of sub-frames used for encoding */
+ int lpcSize; /**< Order of LPC filter */
+ int bufSize; /**< Signal buffer size in encoder */
+ float gamma1; /**< Perceptual filter parameter #1 */
+ float gamma2; /**< Perceptual filter parameter #1 */
+ float lag_factor; /**< Lag-windowing parameter */
+ float lpc_floor; /**< Noise floor for LPC analysis */
+ float preemph; /**< Pre-emphasis */
SpeexSubmode *submodes[SB_SUBMODES]; /**< Sub-mode data for the mode */
int defaultSubmode; /**< Default sub-mode to use when encoding */
diff --git a/libspeex/nb_celp.c b/libspeex/nb_celp.c
index 2337cde..2671bb2 100644
--- a/libspeex/nb_celp.c
+++ b/libspeex/nb_celp.c
@@ -220,7 +220,7 @@ void nb_encode(void *state, float *in, SpeexBits *bits)
float ol_gain;
float delta_qual=0;
float *res, *target, *mem;
- float *stack;
+ void *stack;
float *syn_resp;
st=state;
@@ -804,7 +804,7 @@ void nb_decoder_destroy(void *state)
speex_free(state);
}
-static void nb_decode_lost(DecState *st, float *out, float *stack)
+static void nb_decode_lost(DecState *st, float *out, void *stack)
{
int i, sub;
float *awk1, *awk2, *awk3;
@@ -899,7 +899,7 @@ int nb_decode(void *state, SpeexBits *bits, float *out)
float best_pitch_gain=-1;
int wideband;
int m;
- float *stack;
+ void *stack;
float *awk1, *awk2, *awk3;
st=state;
stack=st->stack;
diff --git a/libspeex/nb_celp.h b/libspeex/nb_celp.h
index 7d13de3..a53f7ad 100644
--- a/libspeex/nb_celp.h
+++ b/libspeex/nb_celp.h
@@ -66,7 +66,7 @@ typedef struct EncState {
float preemph; /**< Pre-emphasis: P(z) = 1 - a*z^-1*/
float pre_mem; /**< 1-element memory for pre-emphasis */
float pre_mem2; /**< 1-element memory for pre-emphasis */
- float *stack; /**< Pseudo-stack allocation for temporary memory */
+ void *stack; /**< Pseudo-stack allocation for temporary memory */
float *inBuf; /**< Input buffer (original signal) */
float *frame; /**< Start of original frame */
float *excBuf; /**< Excitation buffer */
@@ -125,7 +125,7 @@ typedef struct DecState {
float gamma2; /**< Perceptual filter: A(z/gamma2) */
float preemph; /**< Pre-emphasis: P(z) = 1 - a*z^-1*/
float pre_mem; /**< 1-element memory for pre-emphasis */
- float *stack; /**< Pseudo-stack allocation for temporary memory */
+ void *stack; /**< Pseudo-stack allocation for temporary memory */
float *inBuf; /**< Input buffer (original signal) */
float *frame; /**< Start of original frame */
float *excBuf; /**< Excitation buffer */
diff --git a/libspeex/sb_celp.c b/libspeex/sb_celp.c
index 031fb7c..d92eec4 100644
--- a/libspeex/sb_celp.c
+++ b/libspeex/sb_celp.c
@@ -265,7 +265,7 @@ void sb_encode(void *state, float *in, SpeexBits *bits)
{
SBEncState *st;
int i, roots, sub;
- float *stack;
+ void *stack;
float *mem, *innov, *syn_resp;
st = state;
@@ -675,7 +675,7 @@ void sb_decoder_destroy(void *state)
speex_free(state);
}
-static void sb_decode_lost(SBDecState *st, float *out, float *stack)
+static void sb_decode_lost(SBDecState *st, float *out, void *stack)
{
int i;
for (i=0;i<st->frame_size;i++)
@@ -702,7 +702,7 @@ int sb_decode(void *state, SpeexBits *bits, float *out)
SBDecState *st;
int wideband;
int ret;
- float *stack;
+ void *stack;
st = state;
stack=st->stack;
diff --git a/libspeex/sb_celp.h b/libspeex/sb_celp.h
index 5c415d9..7e193ce 100644
--- a/libspeex/sb_celp.h
+++ b/libspeex/sb_celp.h
@@ -57,7 +57,7 @@ typedef struct SBEncState {
float gamma1; /**< Perceptual weighting coef 1 */
float gamma2; /**< Perceptual weighting coef 2 */
- float *stack; /**< Temporary allocation stack */
+ void *stack; /**< Temporary allocation stack */
float *x0d, *x1d; /**< QMF filter signals*/
float *high; /**< High-band signal (buffer) */
float *y0, *y1; /**< QMF synthesis signals */
@@ -107,7 +107,7 @@ typedef struct SBDecState {
int lpcSize;
int first;
- float *stack;
+ void *stack;
float *x0d, *x1d;
float *high;
float *y0, *y1;
diff --git a/libspeex/stack_alloc.h b/libspeex/stack_alloc.h
index 788c5ca..997400f 100644
--- a/libspeex/stack_alloc.h
+++ b/libspeex/stack_alloc.h
@@ -35,12 +35,12 @@
#define STACK_ALLOC_H
/*Aligns the stack to a 'size' boundary */
-#define ALIGN(stack, size) (stack=(float*)((((int)stack)+((size)-1)) & (-(size))))
+#define ALIGN(stack, size) (stack=(void*)((((int)stack)+((size)-1)) & (-(size))))
/*Aligns the stack to a 'size' boundary minus k */
-#define ALIGN_1(stack, size, k) (stack=(float*)(((((int)stack)+((size)-1+(k))) & (-(size)))-(k)))
+#define ALIGN_1(stack, size, k) (stack=(void*)(((((int)stack)+((size)-1+(k))) & (-(size)))-(k)))
/* Allocates 'size' elements of type 'type' on the stack */
-#define PUSH(stack, size, type) (ALIGN(stack,sizeof(type)),stack=(float*)(((int)stack)+((size)*sizeof(type))),(type*)(((int)stack)-((size)*sizeof(type))))
+#define PUSH(stack, size, type) (ALIGN(stack,sizeof(type)),stack=(void*)(((int)stack)+((size)*sizeof(type))),(type*)(((int)stack)-((size)*sizeof(type))))
#endif
diff --git a/libspeex/testenc_wb.c b/libspeex/testenc_wb.c
index 65bd31b..fdcefa5 100644
--- a/libspeex/testenc_wb.c
+++ b/libspeex/testenc_wb.c
@@ -99,6 +99,7 @@ int main(int argc, char **argv)
fprintf (stderr, "Total encoded size: %d bits\n", bitCount);
speex_encoder_destroy(st);
speex_decoder_destroy(dec);
+ speex_bits_destroy(&bits);
fclose(fin);
fclose(fout);
return 1;