Bug 3857 - additional speex file for visual studio compiling support
Status: RESOLVED FIXED
Alias: None
Product: ioquake3
Classification: Unclassified
Component: Sound
Version: GIT MASTER
Hardware: PC Windows 2000
: P3 normal
Assignee: Zachary J. Slater
QA Contact: ioquake3 bugzilla mailing list
URL: http://downloads.xiph.org/releases/sp...
Depends on:
Blocks: 3771
 
Reported: 2008-11-15 13:16 EST by Monk
Modified: 2009-02-11 04:22:14 EST
0 users

See Also:


Attachments
config.h to put into \libspeex folder (487 bytes, application/octet-stream)
2008-11-15 13:18 EST, Monk

Description Monk 2008-11-15 13:16:45 EST
An additional file is needed to get speex compiling properly on the Visual Studio platform.  I will be submitting an updated project file in a separate, existing bug, but one of the prerequesites is that you include a missing file from the speex 1.2rc1 source.

Specifically, the file config.h from the \win32 folder in the linked download should be placed into the ioquake3 folder \libspeex along with all the other .c and .h files.  I will attach this file to this bug, or you can pull it directly from the speex file.  It's basically a short set of definitions.

I figure since ioq3 already includes speex, might as well include one more file related to speex!
Comment 1 Monk 2008-11-15 13:18:27 EST
Created attachment 1922 [details]
config.h to put into \libspeex folder

Here is the file, unmodified, direct from the speex tarball.
Comment 2 Ludwig Nussel 2009-01-15 03:09:03 EST
speex only includes config.h if HAVE_CONFIG_H is defined which is not the case on e.g. linux. so why should that be needed on windows?
Comment 3 Monk 2009-01-15 13:38:02 EST
After consultation with some blokes on the speex-dev mailing list, to get Visual Studio to compile speex as a library, you need to use config.h and the junk defined there.  I did try valiantly to duplicate the ioq3 makefile's directives to get speex working like on Linux and with mingw, but I had no luck and the speex devs I talked to basically called me boneheaded for not using the config.h and related directive.

I would have used a precompiled windows library and had the user go out to get that himself, but there is none for the version that Ryan included in ioq3.  So the choice was to require a VS user to download the specific version of speex used in ioq3 and generate their own libspeex.lib file, wait for speex to generate windows libraries for that specific version, compile a libspeex.lib myself and try to get that included into ioq3's SVN, OR to get the VS compile working with the included /libspeex already in ioq3.  Since we're maintaining/including libspeex in ioq3 already, I figured one additional file wouldn't add too much bloat.  It isn't called by any other platform but Visual Studio and enables VS to compile the included ioq3 speex, so the benefits (in my mind) seemed to greatly outweigh the bloat or inconvenience of adding an additional file.  

I think including a header file is better than both including a precompiled library in ioq3 and getting the user to try and hunt down a specific version of speex to roll their own.  All the other platforms "just work" for compiling ioq3 and speex and this addition allows VS to do the same.

Anyway, those are my thoughts on the subject and hopefully they are convincing enough!
Comment 4 Ludwig Nussel 2009-02-10 02:57:17 EST
fixed
Comment 5 Monk 2009-02-11 03:51:53 EST
config.h should be in \libspeex not in \libspeex\include\speex

In the speex-1.2rc1 tarball, it actually resides in \win32\ nowhere near any other .c or .h files, so I guess it can be put anywhere.

But it depends on if you want me to fix the path in the visual studio project file to reflect it being in \libspeex\include\speex, or if you want to just move it from there to \libspeex.

I'm good to go either way!
Comment 6 Ludwig Nussel 2009-02-11 04:22:14 EST
oops, sorry. Moved to correct place.