1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-27 10:50:53 +00:00

ao_alsa: log the ALSA state if we get a non-XRUN error

The ALSA state generally can tell us more information in case we
get an unexpected error.
This commit is contained in:
Jan Ekström 2018-09-27 21:40:06 +03:00 committed by sfan5
parent fdc952486a
commit cea4ff3e5f

View File

@ -954,8 +954,10 @@ static int get_space(struct ao *ao)
return p->buffersize;
}
MP_ERR(ao, "Error received from snd_pcm_avail (%ld, %s)!\n",
space, snd_strerror(space));
MP_ERR(ao, "Error received from snd_pcm_avail "
"(%ld, %s with ALSA state %s)!\n",
space, snd_strerror(space),
snd_pcm_state_name(snd_pcm_state(p->alsa)));
// request a reload of the AO if device is not present,
// then error out.