From: Dr. A. K. S. <al...@se...> - 2009-12-11 23:20:14
|
Hi all, I was just trying to make access to raw resources possible in xmlvm, in my case .wav files, for the android2iphone toolchain. I thought of implementing openRawResource() for this: public String openRawResource(int resourceId) throws Exception { String fileName = getFileNamePath(findResourceNameById(resourceId)); String filePath = NSBundle.mainBundle().pathForResource(fileName,"wav"); return new FileInputStream(filePath); } However, this leads to severe crashes - in one case even bringing down MacOS(!) when running the app on the simulator. I've checked and fileName / filePath give back reasonable paths (when manually adding the wav files to the resources in Xcode, of course - otherwise it crashes on program start ;-). The moment I instantiate FileInputStream, I get severe crashes without any debugging info that I can see (in Xcode when running on the emulator) I've checked the objectiveC implementation of FileInputStream and it seems to look ok. I've observed this behavior for SVN rev. 690. Any ideas what could cause this? Best, Alex P.S. Very minor issue: float and double NaN constants should read NAN in objC - not NaN. -- Dr. Alexander K. Seewald Seewald Solutions www.seewald.at Tel. +43(664)1106886 Fax. +43(1)2533033/2764 |