嵌入声音提前中断 [英] Embedded Sounds cut off early

查看:26
本文介绍了嵌入声音提前中断的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个组合的 Flash Builder/Flash Pro 项目.由于在时间线上维护声音资产很麻烦,我的声音都嵌入到类文件中,例如:

I have a combined Flash Builder/Flash Pro project. Because of the hassles involving in maintaining sound assets on the timeline, my sounds are all embedded into Class files, like:

[Embed (source="/mp3/Welcome_01_V.mp3", mimeType="audio/mpeg")]
private static const WELCOME_1:Class;

然后这些文件由需要它们的符号的基类引用,这些文件嵌入在第 10 帧上的 Actionscript(因为第二个帧标签位于第 10 帧上,以便为您提供阅读第一个的空间).

These files are then referenced by the base Classes for the symbols that need them, embedded for Actionscript on Frame 10 (because the second frame label is on Frame 10 to give space for you to read the first one).

我发现其中一些 Sounds 没有一直播放,但是 SoundChannel 调度了soundComplete"事件,并且它的最终位置与 Sound 的长度相匹配.

What I'm finding is that a few of these Sounds don't play all the way through, but the SoundChannel dispatches the "soundComplete" event, and its final position matches the Sound's length.

所有声音都以 44Hz/16 kbps 从 wav 转换为 mp3.我伪造了编译器以避免引用 Flex,方法是包含一个扩展 Sound 的虚拟 SoundAsset.

All sounds are converted from wav to mp3 at 44Hz / 16 kbps. I faked out the compiler to avoid a reference to Flex by including a dummy SoundAsset that extends Sound.

我不知道还需要采取哪些其他步骤来调试此问题.有没有办法判断问题出在编译端还是运行端?

I don't know what other steps to take to debug this. Is there a way to figure out whether the problem is on the compile side or on the run side?

我尝试过的更多东西:

  • 查看尺寸报告:非工作声音在他们的嵌入形式比源mp3
  • 摆脱了我自己的 BitmapAsset 并让 Flash 链接到 Flex 框架中,然后做任何事情(绝对更糟)
  • 将编码从 44 kHz 降低到 22 kHz(没有改善或更糟)
  • 将比特率降至 8kbps(最低 dbPowerAmp,我使用的工具支持).这通常会有所帮助,但我仍然通常使用文件末尾的一两个词
  • 在编码中删除了两个参数.这帮助了一些只是降低比特率没有帮助的人,但不是所有的文件.加上它听起来很小.

谢谢!

推荐答案

对于 Flash 音频,如果您有高质量的 wav 源,我建议使用 wav 文件将声音资产导入 FLA.否则,您也可以考虑将 mp3 转换为 wav.然后将 FLA 导出设置设置为您想要的质量,Flash 会以您设置的质量将您的 wav 转换为自己的格式,希望能减少问题.

For Flash audio, I recommend importing the sound assets into a FLA using wav files if you have the high quality source wavs. Otherwise, you can consider converting your mp3 into a wav as well. Then set the FLA export settings to the quality you want and Flash will convert your wavs into its own format at the quality you set with hopefully less issues.

一旦你这样做了,你就可以在你的库中导出动作脚本的声音符号,并像嵌入它一样设置一个类名.

Once you do that, you can export the sound symbol for actionscript in your library and set a class name just like how you would embed it.

我使用的另一个技巧是我有一个专用于声音资产的 FLA,可用于存储任意大的波浪.当我导出它时,它会变成一个小的 SWF 文件,然后我可以将其嵌入到我的主应用程序中.这样,每次导出 swf 时,我都不会让 Flash 将 wav 重新转换为 swf.相反,它只是复制速度更快的 swf 数据.

One other trick I use is I have one FLA just for sound assets which can be used to store as big waves as I want. And when I export that, it becomes a small SWF file which I can then embed in my main application. That way, I never have Flash reconvert the wavs to the swf every single time I export the swf. Instead it just copies the swf data which is much faster as well.

    [Embed(source="Audio/Sfx.swf", symbol="WELCOME_1_WAV")]
    private static const WELCOME_1:Class;

这篇关于嵌入声音提前中断的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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