内置麦克风通话
如何调用计算机内置的麦克风在用户访问站点时打开?我听说有很多不同的方法可以做到这一点,但我想要一些关于最佳方法的建议。
为了提供元级视图,我计划让麦克风拾取噪声并将其显示为图形均衡器(某种),但不记录它。
代码表示赞赏!
How do you call the microphone built into a computer to turn on when a user visits a site? I've heard that there a number of different ways to do so, but I'd like some advice on the best way.
To provide a meta-level view, I'm planning on having the mic pick up noise and display it as a graphic equalizer (of sorts) but not record it.
Code is appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这是一个从麦克风读取数据的 Java 小程序示例。
Here is an example of a Java applet that reads from a microphone.
对于我的闪存麦克风,我使用此类
import org.bytearray.micrecorder.encoder.WaveEncoder;
导入 org.bytearray.micrecorder.events.RecordingEvent;
(只需谷歌即可获取代码)
就像调用它一样简单
,然后您可以执行类似的操作来可视化麦克风噪声的变化。当然,您必须制作自己的 .fla 影片剪辑,以您想要的方式显示“声音”
For my flash microphone i use this class
import org.bytearray.micrecorder.encoder.WaveEncoder;
import org.bytearray.micrecorder.events.RecordingEvent;
(just google it to get the code)
and its as easy as calling this
then you can do something like this to visualize the change in microphone noise. you of course have to make your own .fla movie clip that will display the "sound" in however you want to visualize it
您想要查看 Microphone 类从麦克风拾取声音,并在 computeSpectrum() 方法计算均衡器的频率值。
以下是您尝试执行的操作的示例(来自 adobe 示例):
You want to look at the Microphone class to pick up sound off the mic, and at the computeSpectrum() method to calculate frequency values for the equalizer.
Here's an example of what you're trying to do, from the adobe samples: