views:

13

answers:

2

I'm building a mobile MP3 player with AIR, which streams audio using the Sound class's .load() function. 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??

A: 

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

alxx
A: 

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!!

shawnblais