[xiph-commits] r17000 - in trunk/ao/src: . plugins/oss

xiphmont at svn.xiph.org xiphmont at svn.xiph.org
Mon Mar 22 23:15:37 PDT 2010


Author: xiphmont
Date: 2010-03-22 23:15:37 -0700 (Mon, 22 Mar 2010)
New Revision: 17000

Modified:
   trunk/ao/src/audio_out.c
   trunk/ao/src/plugins/oss/ao_oss.c
Log:
Alter exact handling of unmapped output
Correct output_channels bug in oss driver (because the preceeding patch had not been updated for new setup convention).

also, 

17K GET!



Modified: trunk/ao/src/audio_out.c
===================================================================
--- trunk/ao/src/audio_out.c	2010-03-23 05:58:57 UTC (rev 16999)
+++ trunk/ao/src/audio_out.c	2010-03-23 06:15:37 UTC (rev 17000)
@@ -1041,9 +1041,11 @@
         if(sformat.matrix){
           if(!device->inter_matrix){
             awarn("Driver %s does not support automatic channel mapping;\n"
-                 "continuing without routing channels to specific locations.\n\n",
+                 "\tRouting only L/R channels to output.\n\n",
                  info_table[device->driver_id]->short_name);
-          }else{
+            device->inter_matrix=strdup("L,R");
+          }
+          {
 
             /* walk thorugh the inter matrix, match channels */
             char *op=device->inter_matrix;

Modified: trunk/ao/src/plugins/oss/ao_oss.c
===================================================================
--- trunk/ao/src/plugins/oss/ao_oss.c	2010-03-23 05:58:57 UTC (rev 16999)
+++ trunk/ao/src/plugins/oss/ao_oss.c	2010-03-23 06:15:37 UTC (rev 17000)
@@ -221,10 +221,10 @@
 
 #ifdef SNDCTL_DSP_CHANNELS
         /* OSS versions > 2 */
-        tmp = format->channels;
+        tmp = device->output_channels;
         if (ioctl(internal->fd,SNDCTL_DSP_CHANNELS,&tmp) < 0 ||
-            tmp != format->channels) {
-          aerror("cannot set channels to %d\n", format->channels);
+            tmp != device->output_channels) {
+          aerror("cannot set channels to %d\n", device->output_channels);
           goto ERR;
         }
 #else



More information about the commits mailing list