Ambiguous reference between MonoGame & Microsoft.XNA.Framework namespaces

有些话、适合烂在心里 提交于 2019-12-05 08:17:41

The way to solve this specific problem is by using an extern alias (MSDN, tutorial).

That way you can alias the Microsoft XNA DLL and specify an appropriate using statement just for the Microphone class. Continue using MonoGame as normal.

Possibly a better solution might be to make your own wrapper class called Microphone in the namespace Microsoft.Xna.Framework.Audio using this technique. Put it in a separate assembly so you don't have to pollute your main source code with the extern alias stuff.

The ideal way, of course, is to actually implement Microphone for MonoGame and contribute it ;)

(Of course, this answer says nothing about how successful you might be at mixing MonoGame and XNA in this way, functionality-wise. Hopefully it works.)

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