[Speex-dev] visual studio 2005 - help getting speex workin'
monk at rq3.com
monk at rq3.com
Sat Nov 15 10:00:20 PST 2008
I got this working. For anyone curious, here's what I ended up doing:
> Under the "quake3" project, I add a new filter called "speex" and shove
> *.c from \libspeex into there. I try compiling but it wants a
> preprocessor directive for FLOATING_POINT or FIXED_POINT. Someone else
> mentioned USE_ALLOCA so I gave both a shot. I ended up with about 800
> errors and 800 warnings related to speex files.
Looking at the speex 1.2rc1 VS2005 .sln, I found that I shouldn't bother
using FLOATING_POINT, FIXED_POINT, or USE_ALLOCA. Instead, I should use
HAVE_CONFIG_H. When I did that, the compiler complained that it could not
find config.h.
I copied config.h from the "win32" folder in speex-1.2rc1.tar.gz into
ioquake3's \libspeex folder, then dragged that file to the "speex" Visual
Studio filter that I had defined before.
After that, I had a bunch of warnings, but no errors. And the compile
succeeded. Yay! I see whoever did the Visual Studio files also put in an
ignore of warnings 4244, 4305, 4311, 4100, 4127, and those are pretty much
the speex-related ones I get:
..\..\code\libspeex\vbr.c(83) : warning C4305: '=' : truncation from
'double' to 'float'
..\..\code\libspeex\vbr.c(88) : warning C4244: '=' : conversion from
'double' to 'float', possible loss of data
..\..\code\libspeex\stereo.c(274) : warning C4100: 'state' : unreferenced
formal parameter
...etc.
So I assume those are minor and already known. I checked the resulting
binary and the VOIP-related variables were active in-game, so that's good
enough fer me. I have gotten this working on Win2K with Visual Studio
2005 and will also test it with WinXP and Visual Studio 2008, though I
don't anticipate any real differences between the two platforms, now that
I got the basic compile going.
Thanks again for those who offered suggestions and thanks especially to
those who maintain the Visual Studio/win32 files!
Monk.
More information about the Speex-dev
mailing list