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) };
|
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!()
|
||||||
|
|
Loading…
Reference in New Issue