[xiph-commits] r16984 - in trunk/ao/src: . plugins/esd plugins/oss
xiphmont at svn.xiph.org
xiphmont at svn.xiph.org
Thu Mar 18 18:06:20 PDT 2010
Author: xiphmont
Date: 2010-03-18 18:06:20 -0700 (Thu, 18 Mar 2010)
New Revision: 16984
Modified:
trunk/ao/src/audio_out.c
trunk/ao/src/plugins/esd/ao_esd.c
trunk/ao/src/plugins/oss/ao_oss.c
Log:
Error reporting patchup
Correct logic bug in esd driver
Modified: trunk/ao/src/audio_out.c
===================================================================
--- trunk/ao/src/audio_out.c 2010-03-18 21:10:32 UTC (rev 16983)
+++ trunk/ao/src/audio_out.c 2010-03-19 01:06:20 UTC (rev 16984)
@@ -1010,8 +1010,6 @@
goto error;
}
- adebug("Channel order submitted to backend: %s\n",device->inter_matrix);
-
}else{
device->output_channels = sformat.channels;
}
@@ -1150,9 +1148,13 @@
return device;
error:
- if(sformat.matrix)
- free(sformat.matrix);
- ao_close(device);
+ {
+ int errtemp = errno;
+ if(sformat.matrix)
+ free(sformat.matrix);
+ ao_close(device);
+ errno=errtemp;
+ }
return NULL;
}
Modified: trunk/ao/src/plugins/esd/ao_esd.c
===================================================================
--- trunk/ao/src/plugins/esd/ao_esd.c 2010-03-18 21:10:32 UTC (rev 16983)
+++ trunk/ao/src/plugins/esd/ao_esd.c 2010-03-19 01:06:20 UTC (rev 16984)
@@ -207,10 +207,10 @@
default:
return 0;
}
+ }else{
+ output_samples += ret;
+ num_bytes -= ret;
}
-
- output_samples += ret;
- num_bytes -= ret;
}
return 1;
Modified: trunk/ao/src/plugins/oss/ao_oss.c
===================================================================
--- trunk/ao/src/plugins/oss/ao_oss.c 2010-03-18 21:10:32 UTC (rev 16983)
+++ trunk/ao/src/plugins/oss/ao_oss.c 2010-03-19 01:06:20 UTC (rev 16984)
@@ -206,14 +206,16 @@
internal->fd = open(internal->dev, O_WRONLY);
if(internal->fd < 0) {
- aerror("open(%s) => %s",internal->dev,strerror(errno));
- return 0; /* Cannot open device */
+ aerror("open(%s) => %s\n",internal->dev,strerror(errno));
+ return 0; /* Cannot open device */
}
} else {
internal->fd = _open_default_oss_device(&internal->dev, 1);
- if (internal->fd < 0)
- return 0; /* Cannot open default device */
+ if (internal->fd < 0){
+ aerror("open default => %s\n",strerror(errno));
+ return 0; /* Cannot open default device */
+ }
}
/* Now set all of the parameters */
More information about the commits
mailing list