[Speex-dev] To symbian and speex developers! Building instructions
Alfred E. Heggestad
aeh at db.org
Fri Oct 20 14:02:25 PDT 2006
hi
please see the attached patch which fixes some of the symbian issues..
/alfred
Сергей Паю wrote:
> Hello to everyone!
>
> During building speex library for Symbian OS I encountered some problems. All thess problems can be solved by modifying the speex sources. I don't have access to SVN repository of speex, so I will just describe the changes to be done:
>
> 1) mmp file in symbian derictory misses windows.c sources. You need to add this string into speex.mmp:
>
> SOURCES windows.c
>
> 2) Symbian OS doesn't support static writable data, so you have to modify filters.c sources file. You need to make all global definitions of shift_filt constant. Like this:
>
> const spx_word16_t shift_filt[3][7] = ... (just add 'const')
>
> Also it will be excellent if somebody can make symbian readme more informative. I think readme file should remind to symbian developer to include speex.lib as STATICLIBRARY reference. Otherwise symbian developer will waste a lot of time trying to find the reasons for linking problems,
>
> Thanks,
> Payu Sergey
> _______________________________________________
> Speex-dev mailing list
> Speex-dev at xiph.org
> http://lists.xiph.org/mailman/listinfo/speex-dev
-------------- next part --------------
Index: symbian/bld.inf
===================================================================
--- symbian/bld.inf (revision 11929)
+++ symbian/bld.inf (working copy)
@@ -30,6 +30,21 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+PRJ_EXPORTS
+
+..\include\speex\speex_bits.h \epoc32\include\speex\speex_bits.h
+..\include\speex\speex_callbacks.h \epoc32\include\speex\speex_callbacks.h
+..\include\speex\speex_config_types.h \epoc32\include\speex\speex_config_types.h
+..\include\speex\speex_echo.h \epoc32\include\speex\speex_echo.h
+..\include\speex\speex.h \epoc32\include\speex\speex.h
+..\include\speex\speex_header.h \epoc32\include\speex\speex_header.h
+..\include\speex\speex_jitter.h \epoc32\include\speex\speex_jitter.h
+..\include\speex\speex_noglobals.h \epoc32\include\speex\speex_noglobals.h
+..\include\speex\speex_preprocess.h \epoc32\include\speex\speex_preprocess.h
+..\include\speex\speex_stereo.h \epoc32\include\speex\speex_stereo.h
+..\include\speex\speex_types.h \epoc32\include\speex\speex_types.h
+
+
PRJ_MMPFILES
speex.mmp
Index: symbian/speex.mmp
===================================================================
--- symbian/speex.mmp (revision 11929)
+++ symbian/speex.mmp (working copy)
@@ -36,10 +36,10 @@
MACRO HAVE_CONFIG_H
SOURCEPATH ..\libspeex
SOURCE bits.c cb_search.c exc_5_64_table.c exc_5_256_table.c exc_8_128_table.c
-SOURCE exc_10_16_table.c exc_10_32_table.c exc_20_32_table.c filters.c gain_table.c
+SOURCE exc_10_16_table.c exc_10_32_table.c exc_20_32_table.c fftwrap.c filterbank.c filters.c gain_table.c
SOURCE gain_table_lbr.c hexc_10_32_table.c hexc_table.c high_lsp_tables.c jitter.c
SOURCE lbr_48k_tables.c lpc.c lsp.c lsp_tables_nb.c ltp.c math_approx.c mdf.c misc.c
SOURCE modes.c nb_celp.c preprocess.c quant_lsp.c sb_celp.c smallft.c
-SOURCE speex.c speex_callbacks.c speex_header.c stereo.c vbr.c vq.c
+SOURCE speex.c speex_callbacks.c speex_header.c stereo.c vbr.c vq.c window.c
USERINCLUDE . ..\include\speex
SYSTEMINCLUDE \epoc32\include \epoc32\include\libc ..\include
Index: libspeex/filterbank.c
===================================================================
--- libspeex/filterbank.c (revision 11929)
+++ libspeex/filterbank.c (working copy)
@@ -47,6 +47,8 @@
FilterBank *bank;
float df, max_mel, mel_interval;
int i;
+ int id1;
+ int id2;
df = .5*sampling/len;
max_mel = toBARK(max_freq);
mel_interval = max_mel/(banks-1);
@@ -59,8 +61,6 @@
bank->filter_left = speex_alloc(len*sizeof(float));
bank->filter_right = speex_alloc(len*sizeof(float));
bank->scaling = speex_alloc(banks*sizeof(float));
- int id1;
- int id2;
for (i=0;i<len;i++)
{
Index: libspeex/fftwrap.c
===================================================================
--- libspeex/fftwrap.c (revision 11929)
+++ libspeex/fftwrap.c (working copy)
@@ -103,8 +103,9 @@
if (in==out)
{
int i;
+ float scale;
speex_warning("FFT should not be done in-place");
- float scale = 1./((struct drft_lookup *)table)->n;
+ scale = 1./((struct drft_lookup *)table)->n;
for (i=0;i<((struct drft_lookup *)table)->n;i++)
out[i] = scale*in[i];
} else {
More information about the Speex-dev
mailing list