开发者

Will C++/CLI give me control over low-level devices like audio?

I was wondering - how much limitation is there to C++/CLI compared to classic C++ (chuckle) - I was wanting to write an application that I cannot do with c# -- I was wanting to be able to connect to the PC's audio device and detect audio (for example) - Is this something I can do with C++/CLI?

I have tried using NAudio with c#, but i 开发者_运维技巧have been able to do this. What other advantages would C++/CLI or C++ give me over c#?


Disclaimer: C++ is my favorite language, so I'm a bit biased against Virtual Machines like the CLR.

What other advantages would C++/CLI or C++ give me over c#?
Personally I'd never use C++/CLI unless I needed to wrap an existing C++ codebase for use in .NET. C++/CLI seems to have all the warts of C++ and .NET combined into one hacky solution. If .NET is your primary target, I'd use C# -- it's going to make your job a whole lot easier.


Yes. C++/CLI gives you the full power of native C++ as well as .NET, because you can mix the two as much as you want (even inside one function). So you can write the parts that need to be native in native C++ and the rest in .NET if it's easier (which it usually is).


If you want to capture audio input from a C# app, then all the hard work of writing the C++/CLI wrappers have already been done for you by the good folks over at SlimDX - they've wrapped pretty much everything in DirectX for use in managed applications.

Personally, I wouldn't recommend writing anything in C++/CLI if you can possibly avoid it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜