[alsa-devel] [PATCH] PulseAudio plugin: report XRUN state back to application

Lennart Poettering mznyfn at 0pointer.de
Sun Nov 25 22:12:26 CET 2007


Please consider merging this patch we ship in Fedora:


It adds support to report back XRUN to the application if one
happens. This is required to make some applications work on top of the
pulse plugin. One being XMMS, which checks if a song finished to play
by waiting for an XRUN (yes, I don't argue that XMMS shouldn't do
that, but nonetheless it is a good thing if XRUNs are reported

Now, this patch is a bit problematic, since it touches pcm->io.state
which is not supposed to be touched by ioplug-based plugins --
according to the comments in ioplug. However, I saw no other way to
fix this, and from judging the ioplug code overwriting the variable
should be safe. Thus I decided to simply touch the variable but
documented it in a comment.

Alternatively, ioplug could be beefed up to properly handle XRUNs, but
I thought this fix is simpler.

Also reported on the ALSA BTS:



Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net         ICQ# 11060553
http://0pointer.net/lennart/           GnuPG 0x1A015CC4

More information about the Alsa-devel mailing list