Merge pull request #300 from ishitatsuyuki/patch-1

Small tweak for ALSA underruns
This commit is contained in:
mitchmindtree 2019-07-07 12:57:35 +02:00 committed by GitHub
commit e4ea5e9d06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -712,10 +712,10 @@ impl EventLoop {
available_frames as alsa::snd_pcm_uframes_t,
);
if result == -32 {
if result as i32 == -libc::EPIPE {
// buffer underrun
// TODO: Notify the user of this.
alsa::snd_pcm_prepare(stream.channel);
alsa::snd_pcm_recover(stream.channel, result as i32, 0);
} else if let Err(err) = check_errors(result as _) {
let description = format!("`snd_pcm_writei` failed: {}", err);
let err = BackendSpecificError { description };