"GetOutputDeviceDesc" and "CoreAudioDevices.DescGet" are not in the same order.

Started by Terry, November 25, 2019, 04:27:04 AM

Previous topic - Next topic

Terry

Hello,

"GetOutputDeviceDesc" and "CoreAudioDevices.DescGet" are not in the same order.
Why?

What is more reliable management output devices will not fail due to device changes, after InitSoundSystem.

Thanks and Regards,

Terry.

Administrator

Hello,

the main difference between the 2 methods is the entity that provides output device enumeration:

- GetOutputDeviceDesc and GetOutputDevicesCount methods are managed by Microsoft's DirectSound and they are sorted as reported by the same; listed devices can be used for playback purposes

- CoreAudioDevices.DescGet and CoreAudioDevices.CountGet methods are managed by the Microsoft's CoreAudio API introduced starting from Windows Vista and they are not intended for playback purposes but for replicating features available inside the Windows Sound applet

- there is still a third enumeration way available starting from Windows Vista, again for playback purposes, through the Microsoft's WASAPI methods WASAPI.DeviceGetDesc and WASAPI.DeviceGetCount : in this case there is the possibility to match devices listed by CoreAudio and by WASAPI (yes, they are not in the same order again) through the WASAPI.DeviceCoreAudioIndexGet method

When using legacy DirectSound there is no way to enumerate again devices until the component and the engine are reset through the ResetEngine/ResetControl methods combination or the container application is restarted: CoreAudio and WASAPI, being modern APIs, allow a better control over configuration changes and don't require a reset.

Hope this helps clarifying a bit.

Kind Regards

Severino Delaurenti
MultiMedia Soft