Не подтверждена Коммит 9aa299be создал по автору Oleg Dubinskiy's avatar Oleg Dubinskiy Зафиксировано автором GitHub
Просмотр файлов

[MMIXER] Don't stop audio devices enumeration when one or more of them failed to initialize (#7863)

Skip unsuccessfully initialized devices and continue enumeration until all of devices are enumerated.
Patch by Johannes Anderwald with additional improvements from me.
This fixes 0 audio devices detected for HD audio controllers (e. g., Realtek), and hence allows to properly detect all available devices and play the sound with MMixer routines enabled (they are currently default).
Tested personally with Realtek HD Audio driver version R2.74 for Windows XP/Server 2003 in pair with hdaudbus.sys from Windows Vista SP2 on real hardware.
CORE-17285
владелец 2ec3a199
......@@ -817,11 +817,8 @@ MMixerInitialize(
/* store mixer list */
MixerContext->MixerContext = (PVOID)MixerList;
/* start enumerating all available devices */
Count = 0;
DeviceIndex = 0;
do
/* enumerate all available devices */
for (DeviceIndex = 0; ; DeviceIndex++)
{
/* enumerate a device */
Status = EnumFunction(EnumContext, DeviceIndex, &DeviceName, &hMixer, &hKey);
......@@ -834,29 +831,27 @@ MMixerInitialize(
/* enumeration has finished */
break;
}
else
{
DPRINT1("Failed to enumerate device %lu\n", DeviceIndex);
/* TODO cleanup */
return Status;
}
DPRINT1("EnumFunction() failed for device %lu, Status %x\n", DeviceIndex, Status);
/* ignore error and continue */
}
else
{
/* create a mixer data entry */
Status = MMixerCreateMixerData(MixerContext, MixerList, DeviceIndex, DeviceName, hMixer, hKey);
if (Status != MM_STATUS_SUCCESS)
break;
}
DPRINT1("MMixerCreateMixerData() failed for device %lu, Status %x\n",
DeviceIndex, Status);
/* increment device index */
DeviceIndex++;
}while(TRUE);
/* ignore error and continue */
}
}
/* now all filters have been pre-opened
* lets enumerate the filters
*/
Count = 0;
Entry = MixerList->MixerData.Flink;
while(Entry != &MixerList->MixerData)
{
......
Поддерживает Markdown
0% или .
You are about to add 0 people to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Пожалуйста, зарегистрируйтесь или чтобы прокомментировать