mal_assert(MAL_FALSE); // NOTE: If this is triggered, please report it. It means the format of the ID must haved change and is too long to fit in our fixed sized buffer.
// Only include devices if they are of the correct type. Special cases for "default", "null" and "pulse" - these are included for both playback and capture
pOP = ((mal_pa_context_get_sink_info_list_proc)pContext->pulse.pa_context_get_sink_info_list)(pPulseContext, mal_pulse_sink_info_list_callback, &callbackData);
} else {
pOP = ((mal_pa_context_get_source_info_list_proc)pContext->pulse.pa_context_get_source_info_list)(pPulseContext, mal_pulse_source_info_list_callback, &callbackData);
}
if (pOP == NULL) {
result = MAL_ERROR;
goto done;
}
result = mal_wait_for_operation__pulse(pContext, pMainLoop, pOP);
// The object returned by SNDCTL_SYSINFO will have the information we're after.
int fd = mal_open_temp_device__oss();
if (fd == -1) {
return mal_context_post_error(pContext, NULL, "[OSS] Failed to open a temporary device for retrieving system information used for device enumeration.", MAL_NO_BACKEND);
}
oss_sysinfo si;
int result = ioctl(fd, SNDCTL_SYSINFO, &si);
if (result != -1) {
for (int iAudioDevice = 0; iAudioDevice < si.numaudios; ++iAudioDevice) {