Improve error message.

This commit is contained in:
wb2osz 2023-03-05 15:06:48 +00:00
parent 8a978876bd
commit b4b7b1388d
1 changed files with 8 additions and 0 deletions

View File

@ -354,6 +354,10 @@ int audio_open (struct audio_s *pa)
text_color_set(DW_COLOR_ERROR); text_color_set(DW_COLOR_ERROR);
dw_printf ("Could not open audio device %s for input\n%s\n", dw_printf ("Could not open audio device %s for input\n%s\n",
audio_in_name, snd_strerror(err)); audio_in_name, snd_strerror(err));
if (err == -EBUSY) {
dw_printf ("This means that some other application is using that device.\n");
dw_printf ("The solution is to identify that other application and stop it.\n");
}
return (-1); return (-1);
} }
@ -459,6 +463,10 @@ int audio_open (struct audio_s *pa)
text_color_set(DW_COLOR_ERROR); text_color_set(DW_COLOR_ERROR);
dw_printf ("Could not open audio device %s for output\n%s\n", dw_printf ("Could not open audio device %s for output\n%s\n",
audio_out_name, snd_strerror(err)); audio_out_name, snd_strerror(err));
if (err == -EBUSY) {
dw_printf ("This means that some other application is using that device.\n");
dw_printf ("The solution is to identify that other application and stop it.\n");
}
return (-1); return (-1);
} }