Merge pull request #100 from nicokoch/fix-underflow-linux

Fix underflow bug on linux
This commit is contained in:
tomaka 2016-01-28 22:24:58 +01:00
commit fd0e992e57
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) }; let available = unsafe { alsa::snd_pcm_avail(*channel) };
if available == -32 { if available == -32 {
0 // buffer underrun self.buffer_len as alsa::snd_pcm_sframes_t // buffer underrun
} else if available < 0 { } else if available < 0 {
check_errors(available as libc::c_int).expect("could not write to buffer"); check_errors(available as libc::c_int).expect("could not write to buffer");
unreachable!() unreachable!()