summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pcm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pcm.c b/src/pcm.c
index 2ca8f8a..fd647ca 100644
--- a/src/pcm.c
+++ b/src/pcm.c
@@ -476,6 +476,9 @@ snd_pcm_wait(snd_pcm_t *pcm, int timeout)
goto nodata; // timeout
}
+ if (sio_revents(pcm->hdl, pfd) & want)
+ break;
+
if (timeout > 0) {
const uint64_t delta = ((get_time_ns() - start) / 1e6);
if ((uint64_t)timeout <= delta)
@@ -483,9 +486,6 @@ snd_pcm_wait(snd_pcm_t *pcm, int timeout)
timeout -= delta;
}
-
- if (sio_revents(pcm->hdl, pfd) & want)
- break;
}
return 1;