summaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2012-05-03 19:22:39 +0200
committerGravatar waker <wakeroid@gmail.com>2012-05-03 19:23:08 +0200
commit52be1f66c294caeb628d4d46d0045473403841d5 (patch)
tree9b410132a6679e54205f24c39c32bf451cebe127 /README
parentef1c07cc3bbd19b9f75f3a7d962c619a3952ce8a (diff)
[by Martin Panter <vadmium à gmail·com>]
Retry with the same data after recovering from an underrun or other error The palsa_callback() function seems to limit the rate it returns data, and if a buffer of data is dropped because snd_pcm_writei() failed, the data rate is not fast enough to keep up with ALSA and another buffer underrun occurs. This could cause an indefinite cycle, and the audio would sound slighly choppy and sped up. If the original data is retried, the ALSA buffer eventually tends to become full; perhaps the rate limit is a little faster than real time. When playback continues on to an MP3 file cued in the playlist, the MP3 seems to be scanned before it starts playing. If the scanning takes too long, in my case because the MP3 file is mounted with SSHFS over wifi, it causes a buffer underrun. The code below could also be inserted, just before the snd_pcm_writei() call, to artificially cause an underrun a few seconds into playback: static int n = 0; ++n; if (n >= 200 && n < 300) { trace ("dropping %i\n", n); err = 0; } else err = snd_pcm_writei (...);
Diffstat (limited to 'README')
0 files changed, 0 insertions, 0 deletions