Commit ca3a0242 authored by David Reid's avatar David Reid

ALSA: Fix an infinite loop bug during device initialization.

parent 372b3dd5
...@@ -6642,6 +6642,7 @@ static mal_result mal_device_init__alsa(mal_context* pContext, mal_device_type t ...@@ -6642,6 +6642,7 @@ static mal_result mal_device_init__alsa(mal_context* pContext, mal_device_type t
free(NAME); free(NAME);
free(DESC); free(DESC);
free(IOID); free(IOID);
ppNextDeviceHint += 1;
if (foundDevice) { if (foundDevice) {
break; break;
...@@ -6832,8 +6833,6 @@ static mal_result mal_device_init__alsa(mal_context* pContext, mal_device_type t ...@@ -6832,8 +6833,6 @@ static mal_result mal_device_init__alsa(mal_context* pContext, mal_device_type t
} }
} }
// Grab the internal channel map. For now we're not going to bother trying to change the channel map and // Grab the internal channel map. For now we're not going to bother trying to change the channel map and
// instead just do it ourselves. // instead just do it ourselves.
snd_pcm_chmap_t* pChmap = ((mal_snd_pcm_get_chmap_proc)pContext->alsa.snd_pcm_get_chmap)((snd_pcm_t*)pDevice->alsa.pPCM); snd_pcm_chmap_t* pChmap = ((mal_snd_pcm_get_chmap_proc)pContext->alsa.snd_pcm_get_chmap)((snd_pcm_t*)pDevice->alsa.pPCM);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment