How to use portAudio to read audio data output from sound card?

旧街凉风 提交于 2019-12-25 14:48:15

问题


I was wondering if it is possible to read data that is going from the sound card to the speakers with the PortAudio API. After looking through the documentation, I found an example (http://portaudio.com/docs/v19-doxydocs/paex__record_8c_source.html) where they read data from the microphone. However, I would like to be able to capture the audio that is coming from the sound card. Is there a way to do this in PortAudio and if not please point me in the right direction. Also, it is important that this works on Windows, Mac, and Linux computers and I would prefer to write this in C.


回答1:


This cannot be done. Someone recently submitted a patch that allows this to be done on one of the windows APIs, but that is a special case, and you would have to ask on the mailing list.

It cannot be done cross platform from a simple, single library. For example, on OS X, you need to install special system extensions (or whatever they are called).



来源:https://stackoverflow.com/questions/14333752/how-to-use-portaudio-to-read-audio-data-output-from-sound-card

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