[MPlayer-dev-eng] [PATCH] re-prepare sound card when XRUN happens
Clemens Ladisch
clemens at ladisch.de
Mon Jun 14 08:29:22 CEST 2010
James Zhang wrote:
> I work under Fedora12 recently from Fedora11. Each one of them have the
> same problem which the Mplayer often lost audio.
>
> So, if the sound card can be re-prepare when it got XRUN, the Mplayer
> will be working well.
In theory, the device has been configured to ignore normal underruns.
In practice, I'd guess Fedora is using a plugin that doesn't support
setting the stop threshold, probably PulseAudio?
> + ret = snd_pcm_state(alsa_handler);
The status has just been read from the device, so you can use
snd_pcm_status_get_state here.
> + if(ret == SND_PCM_STATE_XRUN){
There are spaces at the end of the line. And please use the coding
style of the surrounding code.
> + mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_PcmPrepareError,
> snd_strerror(ret));
Your mailer wraps long lines.
Regards,
Clemens
More information about the MPlayer-dev-eng
mailing list