aboutsummaryrefslogtreecommitdiff
path: root/src/pcm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pcm.c')
-rw-r--r--src/pcm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pcm.c b/src/pcm.c
index 7dec5f7..b02883f 100644
--- a/src/pcm.c
+++ b/src/pcm.c
@@ -760,6 +760,10 @@ int pcm_readi(struct pcm *pcm, void *data, unsigned int frame_count)
if (errno == EPIPE) {
/* we failed to make our window -- try to restart */
pcm->underruns++;
+ if (pcm->flags & PCM_NORESTART)
+ return -EPIPE;
+ if (pcm_prepare(pcm))
+ return -EPIPE;
continue;
}
return oops(pcm, errno, "cannot read stream data");