Save encoded .mp3 to applicationStorageDirectory Adobe Air iOS

风格不统一 提交于 2019-12-06 04:40:30

Untested but try this. If it works, modify the filename to be dynamic as you require.

var myfilename:File = File.applicationStorageDirectory;
myfilename = myfilename.resolvePath("myVoice.mp3");


var outputStream:FileStream = new FileStream();
outputStream.open(myfilename,FileMode.WRITE);
outputStream.writeBytes(mp3encoder.mp3Data,0,mp3encoder.mp3Data.length);
outputStream.close();

I know my answer is little bit late, but maybe it will be useful for somebody who will find this post in future.

When you develop on Windows in Adobe AIR and try to save something in File.applicationStorageDirectory it will NOT saved in the same folder like your swf or fla file.

It will be saved here: C:\Users[WIN_LOGIN]\AppData\Roaming[APP_ID]\Local Store

Your APP_ID you will find and set in Publish Settings for IOS.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!