diff options
author | Chris Robinson <[email protected]> | 2018-02-03 13:54:42 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-02-03 13:54:42 -0800 |
commit | b99e64a0e3759d326b53578516a4ca5084046e7c (patch) | |
tree | 4ebac51460010301a7d841c3bf87a44c518f19d9 /Alc/backends/qsa.c | |
parent | e49607078e7d34eaf2f7daecc2ee6bf6ece353c4 (diff) |
Provide more descriptive messages to disconnection events
Diffstat (limited to 'Alc/backends/qsa.c')
-rw-r--r-- | Alc/backends/qsa.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Alc/backends/qsa.c b/Alc/backends/qsa.c index 614d738c..484cadaa 100644 --- a/Alc/backends/qsa.c +++ b/Alc/backends/qsa.c @@ -220,7 +220,7 @@ FORCE_ALIGN static int qsa_proc_playback(void *ptr) if(sret == -1) { ERR("select error: %s\n", strerror(errno)); - aluHandleDisconnect(device); + aluHandleDisconnect(device, "Failed waiting for playback buffer: %s", strerror(errno)); break; } if(sret == 0) @@ -251,7 +251,7 @@ FORCE_ALIGN static int qsa_proc_playback(void *ptr) { if(snd_pcm_plugin_prepare(data->pcmHandle, SND_PCM_CHANNEL_PLAYBACK) < 0) { - aluHandleDisconnect(device); + aluHandleDisconnect(device, "Playback recovery failed"); break; } } @@ -847,7 +847,7 @@ static ALCuint qsa_available_samples(CaptureWrapper *self) if ((rstatus=snd_pcm_plugin_prepare(data->pcmHandle, SND_PCM_CHANNEL_CAPTURE))<0) { ERR("capture prepare failed: %s\n", snd_strerror(rstatus)); - aluHandleDisconnect(device); + aluHandleDisconnect(device, "Failed capture recovery: %s", snd_strerror(rstatus)); return 0; } @@ -890,7 +890,7 @@ static ALCenum qsa_capture_samples(CaptureWrapper *self, ALCvoid *buffer, ALCuin switch (selectret) { case -1: - aluHandleDisconnect(device); + aluHandleDisconnect(device, "Failed to check capture samples"); return ALC_INVALID_DEVICE; case 0: break; @@ -921,7 +921,8 @@ static ALCenum qsa_capture_samples(CaptureWrapper *self, ALCvoid *buffer, ALCuin if ((rstatus=snd_pcm_plugin_prepare(data->pcmHandle, SND_PCM_CHANNEL_CAPTURE))<0) { ERR("capture prepare failed: %s\n", snd_strerror(rstatus)); - aluHandleDisconnect(device); + aluHandleDisconnect(device, "Failed capture recovery: %s", + snd_strerror(rstatus)); return ALC_INVALID_DEVICE; } snd_pcm_capture_go(data->pcmHandle); |