summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty <xiphmont@xiph.org>2001-05-27 20:33:19 +0000
committerMonty <xiphmont@xiph.org>2001-05-27 20:33:19 +0000
commit22fcc5d7967bb646d81dc912eaf387c35afe1d88 (patch)
tree9d46a9673bef1073ce11906a7343135dfb915932
parent904433d7507f5b37199670c8e6ff11ff85ab57da (diff)
downloadlibvorbis-git-22fcc5d7967bb646d81dc912eaf387c35afe1d88.tar.gz
decoder_example non-stereo decode fix
better autoconf sensing of float-version math lib funcs Monty svn path=/trunk/vorbis/; revision=1463
-rw-r--r--configure.in9
-rw-r--r--examples/decoder_example.c4
-rw-r--r--lib/os.h21
3 files changed, 28 insertions, 6 deletions
diff --git a/configure.in b/configure.in
index 8ba2d418..f4b0560c 100644
--- a/configure.in
+++ b/configure.in
@@ -168,6 +168,15 @@ dnl --------------------------------------------------
AC_FUNC_ALLOCA
AC_FUNC_MEMCMP
+AC_CHECK_FUNCS(sqrtf)
+AC_CHECK_FUNCS(logf)
+AC_CHECK_FUNCS(expf)
+AC_CHECK_FUNCS(powf)
+AC_CHECK_FUNCS(acosf)
+AC_CHECK_FUNCS(atanf)
+AC_CHECK_FUNCS(frexpf)
+AC_CHECK_FUNCS(rintf)
+
dnl --------------------------------------------------
dnl Do substitutions
dnl --------------------------------------------------
diff --git a/examples/decoder_example.c b/examples/decoder_example.c
index 735da5bc..2eba0037 100644
--- a/examples/decoder_example.c
+++ b/examples/decoder_example.c
@@ -11,7 +11,7 @@
********************************************************************
function: simple example decoder
- last mod: $Id: decoder_example.c,v 1.19 2001/03/26 23:27:42 xiphmont Exp $
+ last mod: $Id: decoder_example.c,v 1.20 2001/05/27 20:33:18 xiphmont Exp $
********************************************************************/
@@ -253,7 +253,7 @@ int main(int argc, char **argv){
clipflag=1;
}
*ptr=val;
- ptr+=2;
+ ptr+=vi.channels;
}
}
diff --git a/lib/os.h b/lib/os.h
index 3ca97f23..1f1a8ef6 100644
--- a/lib/os.h
+++ b/lib/os.h
@@ -9,11 +9,11 @@
* *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2001 *
* by the XIPHOPHORUS Company http://www.xiph.org/ *
-
+ * *
********************************************************************
function: #ifdef jail to whip a few platforms into the UNIX ideal.
- last mod: $Id: os.h,v 1.24 2001/02/26 03:50:42 xiphmont Exp $
+ last mod: $Id: os.h,v 1.25 2001/05/27 20:33:19 xiphmont Exp $
********************************************************************/
@@ -50,18 +50,31 @@
# define NO_FLOAT_MATH_LIB
#endif
-#ifndef NO_FLOAT_MATH_LIB
+#ifdef HAVE_SQRTF
# define sqrt sqrtf
+#endif
+#ifdef HAVE_LOGF
# define log logf
+#endif
+#ifdef HAVE_EXPF
# define exp expf
+#endif
+#ifdef HAVE_POWF
# define pow powf
+#endif
+#ifdef HAVE_ACOSF
# define acos acosf
+#endif
+#ifdef HAVE_ATANF
# define atan atanf
+#endif
+#ifdef HAVE_FREXPF
# define frexp frexpf
+#endif
+#ifdef HAVE_RINTF
# define rint rintf
#endif
-
#ifndef FAST_HYPOT
# define FAST_HYPOT hypot
#endif