diff options
author | Alexey Yakovenko <wakeroid@gmail.com> | 2009-11-28 15:11:11 +0100 |
---|---|---|
committer | Alexey Yakovenko <wakeroid@gmail.com> | 2009-11-28 15:11:11 +0100 |
commit | f1d393a8b7330dfa98e3b60c634e1e597411a377 (patch) | |
tree | a37ed905af2b535f980702169ada0ba434ed88c6 /palsa.c | |
parent | 735cdcba6c0622eb7a12d5076fd1656f39ecb2d5 (diff) |
fixed random alsa lock in palsa_change_rate
Diffstat (limited to 'palsa.c')
-rw-r--r-- | palsa.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -420,6 +420,8 @@ palsa_thread (uintptr_t context) { } /* deliver the data */ + // FIXME: under some conditions, frames_to_deliver may become huge + // like 20M. this case is not handled here. char buf[frames_to_deliver*4]; palsa_callback (buf, frames_to_deliver*4); if ((err = snd_pcm_writei (audio, buf, frames_to_deliver)) < 0) { @@ -428,7 +430,7 @@ palsa_thread (uintptr_t context) { snd_pcm_start (audio); } mutex_unlock (mutex); -// usleep (1000); // removing this causes deadlock on exit + usleep (1000); // this must be here to prevent mutex deadlock } } |