speex: Fix compilation error with recent GCC by making cast explicit

This commit is contained in:
Rémi Verschelde
2025-01-02 23:23:37 +01:00
parent a87391d256
commit 69d43053de
2 changed files with 36 additions and 0 deletions

View File

@ -330,7 +330,11 @@ void spx_fft_float(void *table, float *in, float *out)
#endif
for (i=0;i<N;i++)
_in[i] = (int)floor(.5+in[i]);
#ifdef USE_SMALLFT
spx_fft(table, (float *)_in, (float *)_out);
#else
spx_fft(table, _in, _out);
#endif
for (i=0;i<N;i++)
out[i] = _out[i];
#if 0
@ -366,7 +370,11 @@ void spx_ifft_float(void *table, float *in, float *out)
#endif
for (i=0;i<N;i++)
_in[i] = (int)floor(.5+in[i]);
#ifdef USE_SMALLFT
spx_ifft(table, (float *)_in, (float *)_out);
#else
spx_ifft(table, _in, _out);
#endif
for (i=0;i<N;i++)
out[i] = _out[i];
#if 0

View File

@ -0,0 +1,28 @@
diff --git a/thirdparty/speex/fftwrap.c b/thirdparty/speex/fftwrap.c
index ac71bbfcb7..9765630e12 100644
--- a/thirdparty/speex/fftwrap.c
+++ b/thirdparty/speex/fftwrap.c
@@ -330,7 +330,11 @@ void spx_fft_float(void *table, float *in, float *out)
#endif
for (i=0;i<N;i++)
_in[i] = (int)floor(.5+in[i]);
+#ifdef USE_SMALLFT
+ spx_fft(table, (float *)_in, (float *)_out);
+#else
spx_fft(table, _in, _out);
+#endif
for (i=0;i<N;i++)
out[i] = _out[i];
#if 0
@@ -366,7 +370,11 @@ void spx_ifft_float(void *table, float *in, float *out)
#endif
for (i=0;i<N;i++)
_in[i] = (int)floor(.5+in[i]);
+#ifdef USE_SMALLFT
+ spx_ifft(table, (float *)_in, (float *)_out);
+#else
spx_ifft(table, _in, _out);
+#endif
for (i=0;i<N;i++)
out[i] = _out[i];
#if 0