【发布时间】:2013-10-14 00:29:30
【问题描述】:
我正在尝试使用以下代码将声音文件放入 Flash 程序中。
[Embed(source="../lib/DST-Aircord.mp3")]
static var sndtrck:Class; //used to represent the background music file
static var soundtrack:Sound; //used to handle the soundtrack file
soundtrack = new Sound();
soundtrack.load(sndtrck);
soundtrack.play();
我不确定这是否正确,但它会引发以下错误。
Error: Unsupported sampling rate (32000Hz)
Error: Unable to transcode ../lib/DST-Aircode.mp3.
关于我在 iTunes 中检查的第一个错误,采样率为 44100Hz,我相信这是 Flash 需要运行的。但是 FlashDevelop 是否错误地确定了采样率?我猜第二个错误是由第一个错误引起的,尽管我不完全确定这意味着什么。有谁知道我在尝试将声音嵌入此 SWF 时可能会遗漏什么?
编辑:将加载函数更改为使用嵌入代码中指定的路径会产生相同的错误。
【问题讨论】:
标签: actionscript-3 flash audio flashdevelop sampling