mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-08 21:35:43 +01:00
aplay - added -EINTR error code handling for read/write operations
This commit is contained in:
parent
37325763a5
commit
7fb39a9cd5
1 changed files with 8 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue