aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRicardo Biehl Pasquali <pasqualirb@gmail.com>2018-08-22 16:10:45 -0300
committerRicardo Biehl Pasquali <pasqualirb@gmail.com>2019-01-08 13:05:27 -0200
commit13bf6299d4f6907bcdc97729a17c6172d46637c9 (patch)
tree0013cc024e585de432b7d2c5b513299a713c3347 /src
parent3e06adbab73369ece01493c5e1cb982d7677b307 (diff)
pcm: Do prepare action in pcm_open()
This eliminates the need for prepare in transfer functions and pcm_start(). Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/pcm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pcm.c b/src/pcm.c
index 96a5788..f854a94 100644
--- a/src/pcm.c
+++ b/src/pcm.c
@@ -1129,6 +1129,10 @@ struct pcm *pcm_open(unsigned int card, unsigned int device,
}
#endif
+ /* prepare here so the user does not need to do this later */
+ if (pcm_prepare(pcm))
+ goto fail;
+
pcm->underruns = 0;
return pcm;