From 6b781f72f2798d706bfdead1eef8682d1f0ae31b Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 4 Jun 2014 17:04:25 +0200 Subject: [PATCH] ALSA backend: engine.halted_callback if the process thread dies --- libs/backends/alsa/alsa_audiobackend.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libs/backends/alsa/alsa_audiobackend.cc b/libs/backends/alsa/alsa_audiobackend.cc index e9dc8c339b..fb9c128e71 100644 --- a/libs/backends/alsa/alsa_audiobackend.cc +++ b/libs/backends/alsa/alsa_audiobackend.cc @@ -1340,6 +1340,7 @@ AlsaAudioBackend::main_process_thread () if (engine.process_callback (_samples_per_period)) { _pcmi->pcm_stop (); + _active = false; return 0; } @@ -1412,6 +1413,9 @@ AlsaAudioBackend::main_process_thread () } _pcmi->pcm_stop (); _active = false; + if (_run) { + engine.halted_callback("ALSA I/O error."); + } return 0; }