summaryrefslogtreecommitdiffstats
path: root/plugins/alsa/alsa-api-streams.c
diff options
context:
space:
mode:
authorfulup <fulup.arfoll@iot.bzh>2018-06-06 23:41:00 +0200
committerfulup <fulup.arfoll@iot.bzh>2018-06-06 23:41:00 +0200
commitf21bd1bdcc64e688a156231aa8cf67c49ce1871c (patch)
tree62c785b652ca56155a7c102a34ab64447603bc1d /plugins/alsa/alsa-api-streams.c
parent0575201d3842e9eb32cd75873484f2ecd25952d7 (diff)
Move PCM write to synchronous write to remove XRUN
Diffstat (limited to 'plugins/alsa/alsa-api-streams.c')
-rw-r--r--plugins/alsa/alsa-api-streams.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/alsa/alsa-api-streams.c b/plugins/alsa/alsa-api-streams.c
index 487b0fe..876162d 100644
--- a/plugins/alsa/alsa-api-streams.c
+++ b/plugins/alsa/alsa-api-streams.c
@@ -245,8 +245,8 @@ PUBLIC int CreateOneStream(SoftMixerT *mixer, AlsaStreamAudioT *stream) {
captureName = (char*) streamPcm->cid.cardid;
}
- // everything is not ready to open playback pcm
- error = snd_pcm_open(&streamPcm->handle, captureName, SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK);
+ // everything is now ready to open playback pcm in BLOCKING_MODE this time
+ error = snd_pcm_open(&streamPcm->handle, captureName, SND_PCM_STREAM_PLAYBACK, 0);
if (error) {
AFB_ApiError(mixer->api, "CreateOneStream: mixer=%s stream=%s fail to open capturePcm=%s error=%s", mixer->uid, stream->uid, streamPcm->cid.cardid, snd_strerror(error));
goto OnErrorExit;