/* Here is where we try to determine the best format to use with the device. If the client if wanting exclusive mode, first try finding the best format for that. If this fails, fall back to shared mode. */
/* Here is where we try to determine the best format to use with the device. If the client if wanting exclusive mode, first try finding the best format for that. If this fails, fall back to shared mode. */
result = MA_FORMAT_NOT_SUPPORTED;
result = MA_FORMAT_NOT_SUPPORTED;
if (pData->shareMode == ma_share_mode_exclusive) {
if (pData->shareMode == ma_share_mode_exclusive) {
/* Unfortunately we need to release and re-acquire the audio client according to MSDN. Seems silly - why not just call IAudioClient_Initialize() again?! */
/* Unfortunately we need to release and re-acquire the audio client according to MSDN. Seems silly - why not just call IAudioClient_Initialize() again?! */