Fix underflow bug on linux

This commit is contained in:
Nicolas Koch 2016-01-28 21:27:09 +01:00
parent fa7ef2de55
commit 606bcf9fa6
1 changed files with 5 additions and 5 deletions

View File

@ -302,7 +302,7 @@ impl Voice {
let available = unsafe { alsa::snd_pcm_avail(*channel) };
if available == -32 {
0 // buffer underrun
self.buffer_len as alsa::snd_pcm_sframes_t // buffer underrun
} else if available < 0 {
check_errors(available as libc::c_int).expect("could not write to buffer");
unreachable!()