Is it possible to relate the same audio device in different APIs?

跟風遠走 提交于 2019-12-01 08:20:31

问题


I'm using the winmm api to deal with audio. I'm using waveInGetDeviceCaps and waveInMessage to uniquely identify an "audio line". Everything works fine, except that in Vista, the name of the device is capped in 32 chars by the WaveInCaps struct.

To work around that, I'm envisioning using the core api when OS version is >= Vista. I'm using the IMMDeviceEnumerator.GetDevice and IMMDeviceEnumerator.EnumAudioEndpoints to gather audio line information, but I'm not sure how to tell that one device under core api relates to one entry under the waveXx api.

I guess I could compare the device path of both, but that would go against MS's recommendation of treating the device path string as "opaque".

What would you say?


回答1:


This scenario is described in http://msdn.microsoft.com/en-us/library/dd370819(VS.85).aspx



来源:https://stackoverflow.com/questions/1929658/is-it-possible-to-relate-the-same-audio-device-in-different-apis

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!