Specify the correct debug runtime libraries for the test
and demo executables to prevent mismatch warnings with
the default runtime.
Signed-off-by: Ralph Giles <giles@mozilla.com>
Previously the test programmes happened to link because _getpid
returns an int, which is the default prototype. Instead, include
the appropriate header to supply a real declaration, fixing the
associated warning.
I moved the getpid->_getpid define to the site of the header
inclusion to make clear what's going on, rather than have it
floating in win32/config.h.
Updates the project files to include the new encoder source files.
Use OPUS_RESTRICT and include config.h to set the proper defines
for build under MSVC.
The Microsoft compiler warns about precision reduction from
default double literals to the floats we generally use outside
the fixed-point build. Avoid these by qualifying the literals
as floats.
Thanks to derf for review.
This fixes a SWB hybrid issue where band 18 isn't folded and cannot even
be folded because it's wider than band 17. This was causing noise to
be injected instead.
Fixes a regression in the recursive builds introduced in 5467ce7b3f
that causes `make check-opus` to fail horribly.
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
This fixes a problem where we could end up starving the redundancy
frame, especially for CBR. The solution is to make sure that some
bits are left available -- assuming we use the same rate for redundancy
as for the rest of the frame.
Doing it this way means it's only the weird corner case that actually
pays for being weird, and we don't litter the build dir with an extra
link that normal builds really don't need at all.
It also avoids the problem of platforms where LN_S isn't well defined.
Mostly this is for people building other things using an uninstalled
opus tree so that the opus-uninstalled.pc will return a working -I
with --cflags when PKG_CONFIG_PATH is set to point to the build dir.
The version of AC_OUTPUT that takes parameters has long been
deprecated now, and replaced by AC_CONFIG_* macros, so pass them
with AC_CONFIG_FILES, since we're now using AC_CONFIG_COMMANDS
to do the above.
The floating-point build calls a number of math library
functions, and linking with libm is technically necessary.
It wasn't obvious because most systems support shlib
dependencies and pulled it in that way, or supply the
referenced functions with intrinsics. Discovered the issue
trying to build libopusfile against the uninstalled static
libopus, which unlike opus-tools, doesn't itself need libm.
The -lm argument is only added to Libs for the floating-
point (default) build. It's not necessary for the fixed-
point build.
Also mark which build was used in the .pc file description.
This isn't used anywhere in the code, floating point is just the
default unless FIXED_POINT is defined.
In the speex codebase, arch.h has a check that both FIXED_POINT
and FLOATING_POINT aren't defined simultaneously, in part as a
check that the build system was constructed with thought about
these and other defines. However, we don't have such a check
and to me it seems unnecessary code.