diff options
author | Luo Jinghua <sunmoon1997@gmail.com> | 2008-11-24 14:11:14 +0800 |
---|---|---|
committer | Luo Jinghua <sunmoon1997@gmail.com> | 2008-11-24 14:11:14 +0800 |
commit | de0457e8975925f9fccd6974eeca9975c9bf8cc2 (patch) | |
tree | 2d515de8fff8375de11ca429c501fa80044b75aa /src | |
parent | 87346db34faf1e307aa7dc43b4c96cd0c5941700 (diff) |
AlsaDevice: handle EINTR and print a error message if an error code is unhandled.
Diffstat (limited to 'src')
-rw-r--r-- | src/device_alsa.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/device_alsa.cpp b/src/device_alsa.cpp index 4746638..72dbd1c 100644 --- a/src/device_alsa.cpp +++ b/src/device_alsa.cpp @@ -110,7 +110,10 @@ namespace audiere { snd_pcm_prepare(m_pcm_handle); } else if (ret == -EPIPE) { snd_pcm_prepare(m_pcm_handle); + } else if (ret == -EINTR) { + // nothing to do. } else if (ret < 0) { + fprintf(stderr, "alsa error: %s\n", snd_strerror(ret)); return; } if (ret > 0) { |