diff options
author | Ricardo Biehl Pasquali <pasqualirb@gmail.com> | 2018-08-22 16:10:45 -0300 |
---|---|---|
committer | Ricardo Biehl Pasquali <pasqualirb@gmail.com> | 2019-01-08 13:05:27 -0200 |
commit | 13bf6299d4f6907bcdc97729a17c6172d46637c9 (patch) | |
tree | 0013cc024e585de432b7d2c5b513299a713c3347 | |
parent | 3e06adbab73369ece01493c5e1cb982d7677b307 (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>
-rw-r--r-- | src/pcm.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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; |