aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pcm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pcm.c b/pcm.c
index 461eb5a..010d054 100644
--- a/pcm.c
+++ b/pcm.c
@@ -333,7 +333,8 @@ int pcm_get_htimestamp(struct pcm *pcm, unsigned int *avail,
if (rc < 0)
return -1;
- if (pcm->mmap_status->state == PCM_STATE_XRUN)
+ if ((pcm->mmap_status->state != PCM_STATE_RUNNING) &&
+ (pcm->mmap_status->state != PCM_STATE_DRAINING))
return -1;
*tstamp = pcm->mmap_status->tstamp;