[xiph-commits] r16779 - in trunk/ao: . src
xiphmont at svn.xiph.org
xiphmont at svn.xiph.org
Wed Jan 13 13:56:55 PST 2010
Author: xiphmont
Date: 2010-01-13 13:56:55 -0800 (Wed, 13 Jan 2010)
New Revision: 16779
Modified:
trunk/ao/configure.ac
trunk/ao/src/ao_wmm.c
Log:
Apply wmm debug output patch (turn debug output off by default and add
ability to turn it on to options interface as well as configure script).
This fix is not yet tested on a windows build.
believed to fix #1278
Modified: trunk/ao/configure.ac
===================================================================
--- trunk/ao/configure.ac 2010-01-13 21:14:39 UTC (rev 16778)
+++ trunk/ao/configure.ac 2010-01-13 21:56:55 UTC (rev 16779)
@@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.
-AC_INIT([libao],[0.8.8],[benjihan at users.sourceforge.net])
+AC_INIT([libao],[0.8.9svn],[monty at xiph.org])
AM_INIT_AUTOMAKE([gnu 1.6])
AM_MAINTAINER_MODE
@@ -10,8 +10,8 @@
dnl Library versioning
LIB_CURRENT=3
-LIB_REVISION=3
-LIB_AGE=1
+LIB_REVISION=4
+LIB_AGE=2
AC_SUBST(LIB_CURRENT)
AC_SUBST(LIB_REVISION)
AC_SUBST(LIB_AGE)
@@ -192,6 +192,12 @@
[include WMM output plugin @<:@default=check@:>@])],
[],[enable_wmm="check"]
)
+AC_ARG_ENABLE([wmm_debug],
+ [AS_HELP_STRING(
+ [--enable-wmm-debug],
+ [enable WMM debugging output @<:@default=no@:>@])],
+ [enable_wmm_debug="yes"]
+)
AS_IF([test "x$enable_wmm" != "xno"],
[AC_CHECK_HEADERS([mmsystem.h],
[
@@ -215,6 +221,7 @@
],[],[#include <windows.h>])])
AM_CONDITIONAL([HAVE_WMM],[test "x$has_wmm" = "xyes"])
AS_IF([test "x${has_wmm}" = "xyes"],[WMM_LIBS="-lwinmm"],[WMM_LIBS=""])
+AS_IF([test "x${has_wmm}" = "xyes" && test "x$enable_wmm_debug"],[CFLAGS="$CFLAGS -DAO_WMM_DEBUG=1"],[])
AC_SUBST([WMM_LIBS])
dnl Check for ESD
Modified: trunk/ao/src/ao_wmm.c
===================================================================
--- trunk/ao/src/ao_wmm.c 2010-01-13 21:14:39 UTC (rev 16778)
+++ trunk/ao/src/ao_wmm.c 2010-01-13 21:56:55 UTC (rev 16779)
@@ -42,7 +42,9 @@
#define GALLOC_WVHD_TYPE (GHND)
#define GALLOC_DATA_TYPE (GHND)
-static int debug_flag = 1;
+#ifndef AO_WMM_DEBUG
+ #define AO_WMM_DEBUG 0
+static int debug_flat = AO_WMM_DEBUG;
static void debug(const char * fmt, ...)
{
@@ -65,7 +67,7 @@
return mmbuffer;
}
-static char * ao_wmm_options[] = {"dev","id"};
+static char * ao_wmm_options[] = {"debug", "dev","id"};
static ao_info ao_wmm_info =
{
/* type */ AO_TYPE_LIVE,
@@ -130,6 +132,17 @@
int res = 0;
debug("ao_wmm_set_option(%s,%s) {\n", key, value);
+
+ if(!strcmp("debug")) {
+ if(!strcmp("yes")) {
+ debug_flag = 1; res = 1;
+ } else if(!strcmp("no")) {
+ debug_flag = 0; res = 1;
+ } else {
+ res = 0;
+ } goto finish;
+ }
+
if (!strcmp(key, "dev")) {
if (!strcmp(value,"default")) {
key = "id";
More information about the commits
mailing list