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?
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