如何使用portAudio读取声卡输出的音频数据? [英] How to use portAudio to read audio data output from sound card?

查看:547
本文介绍了如何使用portAudio读取声卡输出的音频数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否可以使用PortAudio API读取从声卡到扬声器的数据.浏览完文档后,我发现了一个示例(http://portaudio.com/docs/v19-doxydocs/paex__record_8c_source.html),他们从麦克风读取数据.但是,我希望能够捕获来自声卡的音频.有没有办法在PortAudio中执行此操作,如果没有,请指向正确的方向.同样,在Windows,Mac和Linux计算机上运行也很重要,我更喜欢用C编写.

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.

推荐答案

此操作无法完成.最近有人提交了一个修补程序,该修补程序允许在Windows API之一上执行此操作,但这是一种特殊情况,您必须在邮件列表中询问.

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.

无法通过简单的单个库跨平台完成.例如,在OS X上,您需要安装特殊的系统扩展名(或任何所谓的系统扩展名).

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

这篇关于如何使用portAudio读取声卡输出的音频数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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