diff Plugins/Output/alsa/audio.c @ 517:55dc40ff1aff trunk

[svn] Add tell_audio(AFormat *, gint *, gint *), for retrieving audio format information from an output plugin. Right now, we need this inside the core to do effects processing. Rationale: - If tell_audio() is unavailable, do not do processing. - If tell_audio() is available and there is a format mismatch, do not do processing yet -- we need to reinitialize the output port before we can do anything useful. Disk Writer and Crossfade are too fragile to make these changes to, so they do not support tell_audio yet.
author nenolod
date Thu, 26 Jan 2006 11:37:48 -0800
parents 197bf689da02
children d539e5c5f730
line wrap: on
line diff
--- a/Plugins/Output/alsa/audio.c	Thu Jan 26 11:18:52 2006 -0800
+++ b/Plugins/Output/alsa/audio.c	Thu Jan 26 11:37:48 2006 -0800
@@ -1177,3 +1177,10 @@
 
 	return 0;
 }
+
+void alsa_tell(AFormat * fmt, gint * rate, gint * nch)
+{
+	(*fmt) = inputf->xmms_format;
+	(*rate) = inputf->rate;
+	(*nch) = inputf->channels;
+}