在 adobe air 中将麦克风数据保存到 mp3
你好,我有一个 adobe air 2 项目,它通过麦克风录制一些短促的声音。我可以将流保存为 wav 文件,但要求将它们保存为 mp3(以便在 Flash 播放器中重播)。
有谁知道这是否可能? 如果不是的话,有没有办法让 Flash 播放器播放 wav 格式的音频?
任何提示表示赞赏。
Hi I have an adobe air 2 project which records some short sounds via the microphone. I am able to save the streams as wav files but require them to be saved as mp3 (For replaying in the flash player).
Does anyone know if this is possible?
If it isn't is there anyway to get the flash player to player audio in wav form?
Any hints appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您使用的是 Adobe AIR v2,那么您应该寻找非 AS3 命令行工具来将 wav 文件转换为 mp3。该过程相当消耗 CPU 资源,即使有一个库可以完成该任务(我还没有听说过),在 Actionscript 中也会花费很长时间。
我的建议是在您的应用程序中包含一个像 LAME 这样的工具,并将您的波形文件传递给它(本质上是在 C 的另一个线程中运行该进程)。唯一的缺点是为您将要部署到的每个潜在操作系统提供一个可执行文件,如果您打算支持 Windows、Mac 和 Linux,则最多可以使用三种不同的 Wave->Mp3 命令行工具。
LAME 链接:http://lame.sourceforge.net/
If you are using Adobe AIR v2 then you should be looking for a Non-AS3 commandline tool to convert the wav file to mp3. The process is fairly CPU intensive and would take a LONG time in Actionscript even if there was a library out there that accomplished the task (which I haven't heard of).
My suggestion is to include a tool like LAME with you application and pass your wave file to it (essentially running the process in another thread in C). The only downside is providing an executable for each potential OS you'll be deploying to, if you intend on support Windows, Mac, and Linux that could be up to three different Wave->Mp3 commandline tools.
Link for LAME: http://lame.sourceforge.net/
似乎是可能的: http://www.jordansthings.com/blog/?p=5< /a>.没有现成的源代码,但那里列出的库应该有所帮助。 (如果需要的话我会反编译它。)
Seems to be possible: http://www.jordansthings.com/blog/?p=5. No ready source, but libraries listed there should help. (I would just decompile it if need be.)