returnmal_context_post_error(pContext,NULL,"[ALSA] snd_pcm_open() failed when trying to open an appropriate default device.",MAL_FAILED_TO_OPEN_BACKEND_DEVICE);
}
}else{
// We're trying to open a specific device. There's a few things to consider here:
//
// mini_al recongnizes a special format of device id that excludes the "hw", "dmix", etc. prefix. It looks like this: ":0,0", ":0,1", etc. When
// an ID of this format is specified, it indicates to mini_al that it can try different combinations of plugins ("hw", "dmix", etc.) until it
// finds an appropriate one that works. This comes in very handy when trying to open a device in shared mode ("dmix"), vs exclusive mode ("hw").
// May end up needing to make small adjustments to the ID, so make a copy.
mal_device_iddeviceID=*pDeviceID;
mal_bool32isDeviceOpen=MAL_FALSE;
if(deviceID.alsa[0]!=':'){
// The ID is not in ":0,0" format. Use the ID exactly as-is.