// If we get here it means we are _not_ using the default device.
mal_bool32 foundDevice = MAL_FALSE;
intfd=mal_open_temp_device__oss();
if(fd==-1){
int fdTemp = mal_open_temp_device__oss();
if (fdTemp == -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;
intresult=ioctl(fd,SNDCTL_SYSINFO,&si);
int result = ioctl(fdTemp, SNDCTL_SYSINFO, &si);
if (result != -1) {
for (int iAudioDevice = 0; iAudioDevice < si.numaudios; ++iAudioDevice) {
oss_audioinfo ai;
ai.dev = iAudioDevice;
result=ioctl(fd,SNDCTL_AUDIOINFO,&ai);
result = ioctl(fdTemp, SNDCTL_AUDIOINFO, &ai);
if (result != -1) {
if (mal_strcmp(ai.devnode, pDeviceID->oss) == 0) {
// It has the same name, so now just confirm the type.