嵌入的声音切断早 [英] Embedded Sounds cut off early

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

问题描述

我有一个结合Flash Builder中/闪存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;

这些文件,然后由基类需要它们的符号,嵌入为ActionScript 10帧上引用(因为第二帧标签为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).

什么我发现的是,其中的一些声音的不玩,一路过关斩将,但的SoundChannel调度soundComplete在事件,其最终位置声音的长度相匹配。

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.

所有的声音都是从WAV转换为MP3在44Hz / 16 kbps的。我伪造了编译器,以避免提及的Flex通过包括虚拟了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?

更多的事情我已经试过:

More things I have tried:

  • 看着大小报告:非工作的声音是在较小的 比源MP3的嵌入形式
  • 在摆脱了我自己了BitmapAsset的,让在Flex框架的Flash链接,并尽一切,做(绝对差)
  • 掉落的编码从44千赫到22千赫(无改善或更糟)
  • 掉落的比特率8kbps的(最低dbPowerAmp,我用的工具,支持)。这通常可以帮助一些,但我还是通常用一两句话从文件末尾
  • 掉落在编码这两个参数。这有助于几那只是删除的比特率也没有,但不是所有的文件。再加上它的声音尖细。
  • Looked at the Size report: The nonworking sounds were smaller in their embedded form than the source mp3
  • Got rid of my own BitmapAsset and let Flash link in the Flex Framework and do whatever that does (definitely worse)
  • Dropped the encoding from 44 kHz to 22 kHz (no improvement or worse)
  • Dropped the bit rate to 8kbps (the lowest dbPowerAmp, the tool I use, supports). This usually helps somewhat, but I still usually use a word or two from the end of the file
  • Dropped both parameters in the encoding. This helped a few that just dropping the bit rate didn't, but not all files. Plus it sounds tinny.

谢谢!

推荐答案

有关闪存音频,我建议使用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文件,我可以把它嵌入到我的主要应用。这样一来,我从来没有闪光重新转换的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天全站免登陆