Commits
- Commit:
b02dadd38071fc5f6fec5241c805077e7a5b818d
- From:
- Omar Polo <op@omarpolo.com>
- Date:
cache audio_nfds()
ALSA' snd_pcm_poll_descriptors_count() can fail with -EPIPE after
an underrun (e.g. after a pause), so we can't call it directly like
this. It's also a bit sloppy to always call audio_nfds(), so instead
save the (initial) value returned and pass it to the various
functions.
Issue reported and fix tested by phoebos (ben [at] bvnf [dot] space),
thank you!
- Commit:
8b3efdb322551aaf432334c16a23f52789c22989
- From:
- Omar Polo <op@omarpolo.com>
- Date:
alsa: set up the onmove callback
With this the alsa backend reports the progresses too, forgot
previously.
- Commit:
440c29a48baee8e864752653f5cca6ea842cfd1e
- From:
- Omar Polo <op@omarpolo.com>
- Date:
alsa: handle xrun due to pausing
amused implements pausing as not sending audio at all until resuming,
i.e. by doing an underrun. ALSA is more strict than sndio, by
default at least, and so we need to call snd_pcm_recover() before
we can play again.
- Commit:
bbd1402d8bfd350185dcc967306c4c72094c2c21
- From:
- Omar Polo <op@omarpolo.com>
- Date:
alsa: fix snd_pcm_writei usage
snd_pcm_writei works in terms of audio frames, not buffer (bytes)
length like snd_write does, so account for that. To do so, prepare
a `bpf' (bytes per frame) multiplier in the configure stage and use
it to convert back and forward between the buffer length and the
number of frames.
While here, also use snd_pcm_avail_update() to know how many frames
may be written.
- Commit:
e26da60a20d19b69c0bafd3005985d2c9965c4f3
- From:
- Omar Polo <op@omarpolo.com>
- Date:
add an audio implementation for ALSA
it still doesn't work correctly, audio is very distorted, but at least
there's some sound.