From: Dr. A. K. S. <al...@se...> - 2010-01-20 11:44:36
|
Hi all, I've finally managed to port the core audio processing library from my android app to iphone and tested it... it works perfectly with <1E-6 difference! (still with --use-jvm) On the way I had to implement some compatibility objectiveC code which I'm willing to contribute. This is basically... * a pretty complete java_util_Vector (based on NSMutableArray) * a pretty complete java_io_FileInputStream (using a memory buffer for simplicity, might have some leaks, did not put the same functions in InputStream as abstract implementations... sorry, was in a hurry) * adding many functions to java_lang_Math * java_lang_Double with conversion functions * minor stuff: + logging the processed code file in ObjectiveCOutputProcess.java This makes finding java source file with still missing opcodes so much easier to find! + adding the wav file type to XCodeFile This automatically adds them to the resources. A workaround to support raw resources would be to rename all Android resources in res/raw to .raw extension, run android build to get R.java, add the .raw file type to XCodeFile and also add an access function to android/content/res/Resources.java like this: public FileInputStream openRawResource(int resourceId) throws Exception { String fileName = getFileNamePath(findResourceNameById(resourceId)); String filePath = NSBundle.mainBundle().pathForResource(fileName,"raw"); return new FileInputStream(filePath); } Works for .wav, at least! What is the best way for me to contribute code? For now there is no major discrepancy with the svn repository, but it is only a matter of time... ;-) Best, Alex -- Dr. Alexander K. Seewald Seewald Solutions www.seewald.at Tel. +43(664)1106886 Fax. +43(1)2533033/2764 |