mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-24 01:04:02 +02:00
sndio: Fix unnecessarily inefficient device enumeration.
This commit is contained in:
@@ -15398,7 +15398,10 @@ mal_result mal_context_enumerate_devices__sndio(mal_context* pContext, mal_enum_
|
|||||||
mal_itoa_s(iDevice, devpath+strlen(devpath), sizeof(devpath)-strlen(devpath), 10);
|
mal_itoa_s(iDevice, devpath+strlen(devpath), sizeof(devpath)-strlen(devpath), 10);
|
||||||
|
|
||||||
struct stat st;
|
struct stat st;
|
||||||
if (stat(devpath, &st) == 0) {
|
if (stat(devpath, &st) != 0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
// The device exists, but we need to check if it's usable as playback and/or capture. This is done
|
// The device exists, but we need to check if it's usable as playback and/or capture. This is done
|
||||||
// via the sndio API by using the "snd/N" format for the device name.
|
// via the sndio API by using the "snd/N" format for the device name.
|
||||||
char devid[256];
|
char devid[256];
|
||||||
@@ -15444,7 +15447,6 @@ mal_result mal_context_enumerate_devices__sndio(mal_context* pContext, mal_enum_
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return MAL_SUCCESS;
|
return MAL_SUCCESS;
|
||||||
#else
|
#else
|
||||||
|
|||||||
Reference in New Issue
Block a user