Fix underflow bug on linux
This commit is contained in:
parent
fa7ef2de55
commit
606bcf9fa6
|
@ -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