开发者

How to locally cache audio when streaming with Sound.load() in Adobe AIR?

I'm building a mobile MP3 player with AIR, which streams audio using the Sound class's .load() functi开发者_如何学Goon. I'd like to cache this audio as it's downloaded, to the the user's SD card.

Is this possible without having to download the file twice??


Sound class has extract() method which fills ByteArray with raw sound data. Note that this will be uncompressed samples taking up lot of space.


Thanks, I ended up opting for background downloading with URLStream, and only using Sound.load() to kick off the first song.

Thinking that I could download, decompress, playback and write to file at the same time was probably a bit ambitious!!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜