]> git.tuebingen.mpg.de Git - paraslash.git/commit
alsa: Select on the alsa poll fd.
authorAndre Noll <maan@systemlinux.org>
Tue, 26 Jul 2011 18:51:24 +0000 (20:51 +0200)
committerAndre Noll <maan@systemlinux.org>
Sat, 13 Aug 2011 10:40:30 +0000 (12:40 +0200)
commit8c8d095eaf5207d4446c561bf26f0eecd2d5f505
tree7d4625cb7af4ea361c3097d7705c3b782f83291b
parentaf3da6f54673a9af52e26465552db20e62d0e706
alsa: Select on the alsa poll fd.

This teaches the post_select method of the alsa writer to get a control
file descriptor from the alsa library via snd_pcm_poll_descriptors().
This file descriptor becomes readable when a buffer period has passed
and new samples can be written to the alsa handle. We add the fd to
the read fd set so that the select() call of the main scheduler loop
returns just in time.

This is more precise and simpler than the previous approach to compute
the time until a buffer underrun occurs.
alsa_write.c
error.h