[xiph-commits] r16800 - trunk/ao/src
xiphmont at svn.xiph.org
xiphmont at svn.xiph.org
Sun Jan 24 08:49:45 PST 2010
Author: xiphmont
Date: 2010-01-24 08:49:45 -0800 (Sun, 24 Jan 2010)
New Revision: 16800
Modified:
trunk/ao/src/ao_wmm.c
trunk/ao/src/audio_out.c
Log:
Correct bugs in ao_wmm.c patch in #1278
Modified: trunk/ao/src/ao_wmm.c
===================================================================
--- trunk/ao/src/ao_wmm.c 2010-01-24 10:22:01 UTC (rev 16799)
+++ trunk/ao/src/ao_wmm.c 2010-01-24 16:49:45 UTC (rev 16800)
@@ -44,7 +44,8 @@
#ifndef AO_WMM_DEBUG
#define AO_WMM_DEBUG 0
-static int debug_flat = AO_WMM_DEBUG;
+#endif
+static int debug_flag = AO_WMM_DEBUG;
static void debug(const char * fmt, ...)
{
@@ -133,10 +134,10 @@
debug("ao_wmm_set_option(%s,%s) {\n", key, value);
- if(!strcmp("debug")) {
- if(!strcmp("yes")) {
+ if(!strcmp(key,"debug")) {
+ if(!strcmp(value,"yes")) {
debug_flag = 1; res = 1;
- } else if(!strcmp("no")) {
+ } else if(!strcmp(value,"no")) {
debug_flag = 0; res = 1;
} else {
res = 0;
Modified: trunk/ao/src/audio_out.c
===================================================================
--- trunk/ao/src/audio_out.c 2010-01-24 10:22:01 UTC (rev 16799)
+++ trunk/ao/src/audio_out.c 2010-01-24 16:49:45 UTC (rev 16800)
@@ -504,14 +504,22 @@
/* Load options */
while (options != NULL) {
- if (!funcs->set_option(device, options->key, options->value)) {
- /* Problem setting options */
- free(device);
- errno = AO_EOPENDEVICE;
- return NULL;
- }
+ /* The output matrix option is handled for the drivers here */
+ if(!strcmp(options->key,"matrix")){
+ /* explicitly set the output matrix to the requested
+ string; devices must not override. */
+ _sanitize_matrix(options->value);
+ device->output_matrix = strdup(options->value);
+ }else{
+ if (!funcs->set_option(device, options->key, options->value)) {
+ /* Problem setting options */
+ free(device);
+ errno = AO_EOPENDEVICE;
+ return NULL;
+ }
+ }
- options = options->next;
+ options = options->next;
}
/* Open the device */
@@ -523,6 +531,10 @@
return NULL; /* Couldn't open device */
}
+ /* set permuatation vector */
+
+
+
/* Resolve actual driver byte format */
device->driver_byte_format =
_real_byte_format(device->driver_byte_format);
More information about the commits
mailing list