Merge pull request #100 from nicokoch/fix-underflow-linux
Fix underflow bug on linux
This commit is contained in:
commit
fd0e992e57
|
@ -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!()
|
||||
|
|
Loading…
Reference in New Issue