[xiph-commits] r3733 - libsydneyaudio/trunk/src
doublec at svn.annodex.net
doublec at svn.annodex.net
Thu Oct 23 20:32:58 PDT 2008
Author: doublec
Date: 2008-10-23 20:32:58 -0700 (Thu, 23 Oct 2008)
New Revision: 3733
Modified:
libsydneyaudio/trunk/src/sydney_audio_alsa.c
Log:
Stop Alsa from writing error messages to stderr
Modified: libsydneyaudio/trunk/src/sydney_audio_alsa.c
===================================================================
--- libsydneyaudio/trunk/src/sydney_audio_alsa.c 2008-10-23 10:32:55 UTC (rev 3732)
+++ libsydneyaudio/trunk/src/sydney_audio_alsa.c 2008-10-24 03:32:58 UTC (rev 3733)
@@ -57,6 +57,21 @@
/*
* -----------------------------------------------------------------------------
+ * Error Handler to prevent output to stderr
+ * ----------------------------------------------------------------------------
+ */
+static void
+quiet_error_handler(const char* file,
+ int line,
+ const char* function,
+ int err,
+ const char* format,
+ ...)
+{
+}
+
+/*
+ * -----------------------------------------------------------------------------
* Startup and shutdown functions
* -----------------------------------------------------------------------------
*/
@@ -116,6 +131,9 @@
return SA_ERROR_INVALID;
}
+ /* Turn off debug output to stderr */
+ snd_lib_error_set_handler(quiet_error_handler);
+
if (snd_pcm_open(&s->output_unit,
"default",
SND_PCM_STREAM_PLAYBACK,
More information about the commits
mailing list