From cd7bf4574932bacfacac5f42243a03c289d29531 Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Wed, 15 May 2019 11:53:13 +0200 Subject: [PATCH] [alsa] Return ALSA the error code from buffer_write, not -1 --- src/outputs/alsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/outputs/alsa.c b/src/outputs/alsa.c index 3f9d646d..b696f0c3 100644 --- a/src/outputs/alsa.c +++ b/src/outputs/alsa.c @@ -613,7 +613,7 @@ buffer_write(struct alsa_session *as, struct output_data *odata, snd_pcm_sframes nsamp = BTOS(bufsize, as->quality.bits_per_sample, as->quality.channels); ret = snd_pcm_writei(as->hdl, buf, nsamp); if (ret < 0) - return -1; + return ret; avail -= ret; }