Macintosh - 检测一段时间内是否有任何数据从声卡中传出
修改:
大家好,我需要检测一段时间内是否有数据发送到声卡。
感谢 Philip Regan 的帮助,我找到了一个关于音频录制的简单示例代码,如下链接所示:
我成功地运行了它。
但它似乎记录了来自内部麦克风的声音,因为当将捕获的信号以十六进制格式转储到屏幕时,如果我将内部麦克风静音,捕获的数据将全部为零值,否则,输出数据将是随机的数字。
不幸的是,如果我将内部麦克风静音,则无法捕获任何内容,否则,由于麦克风的噪音,我无法测试另一台计算机的任何声音。
在这种情况下,捕获声卡的输出信号会有所帮助。但我不知道如何捕捉它。
有什么想法吗?
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:
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不是默认的,不是。您需要访问较低级别的 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.