是否有可能涉及在不同API相同的音频设备? [英] Is it possible to relate the same audio device in different APIs?

查看:193
本文介绍了是否有可能涉及在不同API相同的音频设备?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是WINMM API来处理音频。我使用 waveInGetDeviceCaps waveInMessage 来唯一地标识音频线。一切工作正常,但在Vista中,该设备的名称在32个字符由 WaveInCaps 结构封顶。

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.

要解决的是,我使用的核心API时,操作系统的版本> = Vista的设想。我使用了 IMMDeviceEnumerator.GetDevice IMMDeviceEnumerator.EnumAudioEndpoints 来收集音频线的信息,但我不知道如何告诉核心API下一个设备涉及waveXx API下一个条目。

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.

我想我可以比较两者的设备路径,但是这将不利于治疗设备路径字符串为不透明的MS的建议。

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".

你会怎么说?

推荐答案

这个场景中的 http://msdn.microsoft.com/en-us/library/dd370819(VS.85)的.aspx

这篇关于是否有可能涉及在不同API相同的音频设备?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆