mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-23 08:44:04 +02:00
ALSA: Try making the handling of poll() a bit more robust.
Public issue https://github.com/mackron/miniaudio/issues/836.
This commit is contained in:
+9
-2
@@ -28214,8 +28214,15 @@ static ma_result ma_device_wait__alsa(ma_device* pDevice, ma_snd_pcm_t* pPCM, st
|
|||||||
int resultALSA;
|
int resultALSA;
|
||||||
int resultPoll = poll(pPollDescriptors, pollDescriptorCount, -1);
|
int resultPoll = poll(pPollDescriptors, pollDescriptorCount, -1);
|
||||||
if (resultPoll < 0) {
|
if (resultPoll < 0) {
|
||||||
ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_ERROR, "[ALSA] poll() failed.\n");
|
ma_log_post(ma_device_get_log(pDevice), MA_LOG_LEVEL_WARNING, "[ALSA] poll() failed.\n");
|
||||||
return ma_result_from_errno(errno);
|
|
||||||
|
/*
|
||||||
|
There have been reports that poll() is returning an error randomly and that instead of
|
||||||
|
returning an error, simply trying again will work. I'm experimenting with adopting this
|
||||||
|
advice.
|
||||||
|
*/
|
||||||
|
continue;
|
||||||
|
/*return ma_result_from_errno(errno);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user