Using p/invoke and win-api to monitor audio line-in (C#)

让人想犯罪 __ 提交于 2019-12-22 18:19:13

问题


In the last few days I was trying to write small program to monitor the audio line-in using win-api (winmm.dll). I can pinvoke api functions such as waveInOpen but I can't figure out how to use these functions to achieve my target.

the question is - can someone can briefly tell me how can I get the data from the audio line in using these API (C#).


回答1:


Well I finally found what I was looking for here.

http://www.codeguru.com/forum/archive/index.php/t-264694.html

Although this is a C code example, it is depicting the simple outline of using the windows audio api to read data from the sound-card line-in/microphone device.

I am now working on recodeing this C code to C#. if successful I will post it here.




回答2:


You don't have to!!!

Look this:

Measure speaker volume by recording playing sound with microphone

Join forces with the guy :)



来源:https://stackoverflow.com/questions/3931757/using-p-invoke-and-win-api-to-monitor-audio-line-in-c

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