Macintosh - 检测一段时间内是否有任何数据从声卡中传出

发布于 2024-09-18 21:05:33 字数 716 浏览 2 评论 0 原文

修改:

大家好,我需要检测一段时间内是否有数据发送到声卡。

感谢 Philip Regan 的帮助,我找到了一个关于音频录制的简单示例代码,如下链接所示:

http://developer.apple.com/library/mac/#samplecode/AudioQueueTools/Listings/aqrecord_cpp.html#//apple_ref /doc/uid/DTS10004380-aqrecord_cpp-DontLinkElementID_5

我成功地运行了它。

但它似乎记录了来自内部麦克风的声音,因为当将捕获的信号以十六进制格式转储到屏幕时,如果我将内部麦克风静音,捕获的数据将全部为零值,否则,输出数据将是随机的数字。

不幸的是,如果我将内部麦克风静音,则无法捕获任何内容,否则,由于麦克风的噪音,我无法测试另一台计算机的任何声音。

在这种情况下,捕获声卡的输出信号会有所帮助。但我不知道如何捕捉它。

有什么想法吗?

MODIFIED:

Hi all, I need to detect if any data sent to Audio Card during a period of time.

Thanks to Philip Regan's help, I found a simple sample code about audio recording as shown in following link:

http://developer.apple.com/library/mac/#samplecode/AudioQueueTools/Listings/aqrecord_cpp.html#//apple_ref/doc/uid/DTS10004380-aqrecord_cpp-DontLinkElementID_5

and I managed to run it successfully.

But it seems that it records sound from internal microphone, for, when dumping the captured signal to screen in format of Hex, if I mute the internal microphone, data captured turn out to be all zero values, otherwise, the output data will be random numbers.

Unfortunately, if I mute the internal microphone, nothing can be captured, else, I can't test is any voice from another computer because of the noice from microphone.

In this situation, capture the out-coming signal of Audio Card will help. But I don't know how to capture it.

Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

岁吢 2024-09-25 21:05:33

不是默认的,不是。您需要访问较低级别的 API 才能获取此信息,如果没有扩展,Applescript 将无法运行到该级别。

Not by default, no. You'll need to access the lower-level APIs to get this information, and without an extension, Applescript doesn't work down to that level.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文