mirror of https://github.com/wb2osz/direwolf.git
Merge branch 'dev' of https://github.com/wb2osz/direwolf into dev
This commit is contained in:
commit
c13375a9ab
16
audio.c
16
audio.c
|
@ -1204,6 +1204,17 @@ int audio_flush (int a)
|
||||||
|
|
||||||
snd_pcm_recover (adev[a].audio_out_handle, k, 1);
|
snd_pcm_recover (adev[a].audio_out_handle, k, 1);
|
||||||
}
|
}
|
||||||
|
else if (k == -ESTRPIPE) {
|
||||||
|
text_color_set(DW_COLOR_ERROR);
|
||||||
|
dw_printf ("Driver suspended, recovering\n");
|
||||||
|
snd_pcm_recover(adev[a].audio_out_handle, k, 1);
|
||||||
|
}
|
||||||
|
else if (k == -EBADFD) {
|
||||||
|
k = snd_pcm_prepare (adev[a].audio_out_handle);
|
||||||
|
if(k < 0) {
|
||||||
|
dw_printf ("Error preparing after bad state: %s\n", snd_strerror(k));
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (k < 0) {
|
else if (k < 0) {
|
||||||
text_color_set(DW_COLOR_ERROR);
|
text_color_set(DW_COLOR_ERROR);
|
||||||
dw_printf ("Audio write error: %s\n", snd_strerror(k));
|
dw_printf ("Audio write error: %s\n", snd_strerror(k));
|
||||||
|
@ -1211,7 +1222,10 @@ int audio_flush (int a)
|
||||||
/* Some other error condition. */
|
/* Some other error condition. */
|
||||||
/* Try again. What do we have to lose? */
|
/* Try again. What do we have to lose? */
|
||||||
|
|
||||||
snd_pcm_recover (adev[a].audio_out_handle, k, 1);
|
k = snd_pcm_prepare (adev[a].audio_out_handle);
|
||||||
|
if(k < 0) {
|
||||||
|
dw_printf ("Error preparing after error: %s\n", snd_strerror(k));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (k != adev[a].outbuf_len / adev[a].bytes_per_frame) {
|
else if (k != adev[a].outbuf_len / adev[a].bytes_per_frame) {
|
||||||
text_color_set(DW_COLOR_ERROR);
|
text_color_set(DW_COLOR_ERROR);
|
||||||
|
|
Loading…
Reference in New Issue