[MPlayer-cvslog] CVS: main/libao2 ao_alsa.c,1.39,1.40
Clemens Ladisch CVS
syncmail at mplayerhq.hu
Mon Mar 13 11:50:41 CET 2006
CVS change done by Clemens Ladisch CVS
Update of /cvsroot/mplayer/main/libao2
In directory mail:/var2/tmp/cvs-serv25411/libao2
Modified Files:
ao_alsa.c
Log Message:
To avoid a bug in ALSA's rate plugin that causes spurious overruns, try
to disable it so that mplayer's resampler is used.
Index: ao_alsa.c
===================================================================
RCS file: /cvsroot/mplayer/main/libao2/ao_alsa.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- ao_alsa.c 13 Mar 2006 10:49:12 -0000 1.39
+++ ao_alsa.c 13 Mar 2006 10:50:37 -0000 1.40
@@ -533,6 +533,18 @@
return(0);
}
+ /* workaround for buggy rate plugin (should be fixed in ALSA 1.0.11)
+ prefer our own resampler */
+#if SND_LIB_VERSION >= 0x010009
+ if ((err = snd_pcm_hw_params_set_rate_resample(alsa_handler, alsa_hwparams,
+ 0)) < 0)
+ {
+ mp_msg(MSGT_AO,MSGL_ERR,"alsa-init: unable to disable resampling: %s\n",
+ snd_strerror(err));
+ return(0);
+ }
+#endif
+
if ((err = snd_pcm_hw_params_set_rate_near(alsa_handler, alsa_hwparams,
&ao_data.samplerate, NULL)) < 0)
{
More information about the MPlayer-cvslog
mailing list