summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/output/plugins/AlsaOutputPlugin.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/output/plugins/AlsaOutputPlugin.cxx b/src/output/plugins/AlsaOutputPlugin.cxx
index 8932a02fb..8b505db7d 100644
--- a/src/output/plugins/AlsaOutputPlugin.cxx
+++ b/src/output/plugins/AlsaOutputPlugin.cxx
@@ -727,9 +727,12 @@ AlsaOutput::DrainInternal()
/* drain period_buffer */
if (!period_buffer.IsEmpty()) {
auto frames_written = WriteFromPeriodBuffer();
- if (frames_written < 0 && frames_written != -EAGAIN) {
- CancelInternal();
- return true;
+ if (frames_written < 0) {
+ if (frames_written == -EAGAIN)
+ return false;
+
+ throw FormatRuntimeError("snd_pcm_writei() failed: %s",
+ snd_strerror(-frames_written));
}
if (!period_buffer.IsEmpty())