Switch to side-by-side view
--- a/sc2src/alsadirect.cpp +++ b/sc2src/alsadirect.cpp @@ -66,6 +66,7 @@ static string alsadevice("default"); static bool alsa_init(const string& dev, AudioMessage *tsk); +static void alsa_close(); // From MPD recovery code static int alsa_recover(snd_pcm_t *pcm, int err) @@ -181,7 +182,12 @@ buf += tsk->frames_to_bytes(ret); frames -= ret; - } + } + if (tsk->m_halt) { + LOGDEB("alsawriter: halt\n"); + alsa_close(); + qinit = false; + } delete tsk; }