2004-03-24 Benjamin Otte <otte@gnome.org>
+ * ext/alsa/gstalsa.c: (gst_alsa_open_audio),
+ (gst_alsa_probe_hw_params):
+ * ext/alsa/gstalsa.h:
+ debugging output fixes
+
+2004-03-24 Benjamin Otte <otte@gnome.org>
+
* ext/gnomevfs/gstgnomevfssrc.c: (gst_gnomevfssrc_set_property):
don't g_return_if_fail if element is PLAYING, fail silently as every
other element.
if (!gst_element_get_pad_list (GST_ELEMENT (this)))
return TRUE;
- GST_INFO ("Opening alsa device \"%s\"...\n", this->device);
+ GST_INFO ("Opening alsa device \"%s\"...", this->device);
#if 0
/* enable this to get better debugging */
g_return_val_if_fail (this != NULL, FALSE);
g_return_val_if_fail (format != NULL, FALSE);
- GST_INFO ("Probing format: %s %dHz, %d channels\n",
+ GST_INFO ("Probing format: %s %dHz, %d channels",
snd_pcm_format_name (format->format), format->rate, format->channels);
snd_pcm_hw_params_alloca (&hw_params);
SIMPLE_ERROR_CHECK (snd_pcm_hw_params_set_periods_integer (this->handle,
hw_params));
+#if 0
/* enable this for soundcard specific debugging */
- /* snd_pcm_hw_params_dump (hw_params, this->out); */
+ snd_pcm_hw_params_dump (hw_params, this->out);
+#endif
mask = alloca (snd_pcm_access_mask_sizeof ());
snd_pcm_access_mask_none (mask);
/* NOTE: these functions require a GObject *this and can only be used in
functions that return TRUE on success and FALSE on error */
#define SIMPLE_ERROR_CHECK(value) G_STMT_START{ \
- int err = (value); if (err < 0) { return FALSE; } \
+ int err = (value); \
+ if (err < 0) { \
+ GST_WARNING_OBJECT (this, "\"" #value "\": %s", snd_strerror (err)); \
+ return FALSE; \
+ } \
}G_STMT_END