Skip to content

Commit e76d84f

Browse files
wb2oszbjpetit
authored andcommitted
Improve error message.
1 parent bc7953f commit e76d84f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Diff for: src/audio.c

+8
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,10 @@ int audio_open (struct audio_s *pa)
354354
text_color_set(DW_COLOR_ERROR);
355355
dw_printf ("Could not open audio device %s for input\n%s\n",
356356
audio_in_name, snd_strerror(err));
357+
if (err == -EBUSY) {
358+
dw_printf ("This means that some other application is using that device.\n");
359+
dw_printf ("The solution is to identify that other application and stop it.\n");
360+
}
357361
return (-1);
358362
}
359363

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

0 commit comments

Comments
 (0)