4
我遇到了一個問題,我無法解決3天,而你是我的最後一個希望。[MonoTouch] [Bass.dll]應用程序崩潰「正在嘗試JIT編譯方法..運行時使用-aot-only」
我的目標是錄製聲音Bass.dll(有一個爲iPhone和庫的特殊版本的.NET包裝它的版本,可以在這裏找到:un4seen.com)
在模擬器程序工作 (或似乎正常工作)。但是,當我試圖在iPhone上運行它 - 我得到這個錯誤:
「嘗試JIT編譯方法」(包裝本機到託管)RecordingAudioHelloWorld.Player:recordingHandler(int,intptr,int,intptr)'同時以--aot-only運行。「
錯誤發生在這裏:
RECORDPROC _recordingHandler = new RECORDPROC(recordingHandler);
_record = Bass.BASS_RecordStart(16000, 1, BASSFlag.BASS_SPEAKER_RIGHT, _recordingHandler, IntPtr.Zero); // <-- ERROR!!!
private int recordingHandler (int handle, IntPtr buffer, int length, IntPtr user)
{
//....
}
當我讀到這裏,就這樣,我改變了鏈接的行爲「鏈接SDK組件只」,但它沒有任何效果。
我可以用它做什麼嗎?
謝謝!完美的作品! –
加入 [MonoPInvokeCallbackAttribute(typeof運算(_Ov_fopen))] [的DllImport( 「__內部」,CallingConvention = CallingConvention.Cdecl,入口點= 「ov_fopen」)] 公共靜態外部不安全INT ov_fopen([在()] [的MarshalAs後(UnmanagedType.LPStr)] string path,ref File vf); 代表: [UnmanagedFunctionPointer(CallingConvention.StdCall)] delegate int _Ov_fopen(string path,ref File file); 給我另一個錯誤 錯誤MT3001:無法AOT程序集'/XXX/obj/iPhone/Debug/build-iphone5.2-8.1.1/mtouch-cache/Build/BindingLibrary.dll'(MT3001 )'@ Rolf Bjarne Kvinge – Brijesh