aplay - added -EINTR error code handling for read/write operations

This commit is contained in:
Jaroslav Kysela 2005-08-23 12:54:26 +00:00
parent 37325763a5
commit 7fb39a9cd5

View file

@ -1178,6 +1178,8 @@ static ssize_t pcm_write(u_char *data, size_t count)
xrun();
} else if (r == -ESTRPIPE) {
suspend();
} else if (r == -EINTR) {
continue;
} else if (r < 0) {
error(_("write error: %s"), snd_strerror(r));
exit(EXIT_FAILURE);
@ -1220,6 +1222,8 @@ static ssize_t pcm_writev(u_char **data, unsigned int channels, size_t count)
xrun();
} else if (r == -ESTRPIPE) {
suspend();
} else if (r == -EINTR) {
continue;
} else if (r < 0) {
error(_("writev error: %s"), snd_strerror(r));
exit(EXIT_FAILURE);
@ -1259,6 +1263,8 @@ static ssize_t pcm_read(u_char *data, size_t rcount)
xrun();
} else if (r == -ESTRPIPE) {
suspend();
} else if (r == -EINTR) {
continue;
} else if (r < 0) {
error(_("read error: %s"), snd_strerror(r));
exit(EXIT_FAILURE);
@ -1298,6 +1304,8 @@ static ssize_t pcm_readv(u_char **data, unsigned int channels, size_t rcount)
xrun();
} else if (r == -ESTRPIPE) {
suspend();
} else if (r == -EINTR) {
continue;
} else if (r < 0) {
error(_("readv error: %s"), snd_strerror(r));
exit(EXIT_FAILURE);