动作3 - Sound.extract方法清空声音对象数据 [英] Actionscript 3 - Sound.extract method empties sound object data
问题描述
我使用下面的提取Sound对象的字节信息 - 但是如果我回到同一个声音对象,并再次运行此,则ByteArray没有可用的字节
。 VAR数据:ByteArray的=新的ByteArray;
sound.extract(数据,sound.length * 44.1);
data.position = 0;
返回的数据;
这是正确的行为? 有没有办法做到这一点多次相同的声音对象?还是我在这里做得不对。任何帮助AP preciated - 谢谢
sound.extract(数据,sound.length * 44.1,-1);
也许你需要使用-1设置指定startPosition。 否则,当你回到相同的声音,并再次呼吁提取物,该startpositon不会是-1。
I am using the following to extract the byte info from a sound object - however if I go back to the same sound object and run this again, The byteArray has no bytes available.
var data:ByteArray = new ByteArray;
sound.extract(data,sound.length*44.1);
data.position = 0;
return data;
Is this the correct behavior? Is there not a way to do this multiple times on the same sound object? Or am I doing something wrong here. Any help appreciated - thanks
sound.extract(data,sound.length*44.1, -1);
Maybe you need to set the startPosition with -1. Otherwise when you go back to the same sound and call extract again, the startpositon will not be -1.
这篇关于动作3 - Sound.extract方法清空声音对象数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!