运行代码以启用InputAudioQueue时,Xamarin.Iphone应用程序崩溃

时间:2016-10-04 11:54:09

标签: xamarin.ios recording

我正在尝试在以下链接上实现代码 Recording with AudioQueue and Monotouch static sound 使用麦克风录制麦克风的声音,应用程序不断崩溃,使用下面的堆栈跟踪:

critical: 
Native stacktrace:
2016-10-04 15:41:51.119 JUser[3163:1136833] critical: 0   JUser                           0x000000010012bd68 mono_handle_native_sigsegv + 260
2016-10-04 15:41:51.119 JUser[3163:1136833] critical: 1   libsystem_platform.dylib            0x0000000192cff348 _sigtramp + 52
2016-10-04 15:41:51.119 JUser[3163:1136833] critical: 2   libsystem_kernel.dylib              0x0000000192c39480 <redacted> + 100
2016-10-04 15:41:51.120 JUser[3163:1136833] critical: 3   libsystem_kernel.dylib              0x0000000192c394c8 system_set_sfi_window + 0
2016-10-04 15:41:51.120 JUser[3163:1136833] critical: 4   TCC                                 0x0000000195e7a560 <redacted> + 0
2016-10-04 15:41:51.120 JUser[3163:1136833] critical: 5   TCC                                 0x0000000195e7a45c <redacted> + 0
2016-10-04 15:41:51.120 JUser[3163:1136833] critical: 6   TCC                                 0x0000000195e7d52c <redacted> + 288
2016-10-04 15:41:51.120 JUser[3163:1136833] critical: 7   libxpc.dylib                        0x0000000192d4401c <redacted> + 80
2016-10-04 15:41:51.120 JUser[3163:1136833] critical: 8   libxpc.dylib                        0x0000000192d43f8c <redacted> + 40
2016-10-04 15:41:51.120 JUser[3163:1136833] critical: 9   libdispatch.dylib                   0x0000000192af91c0 <redacted> + 16
2016-10-04 15:41:51.120 JUser[3163:1136833] critical: 10  libdispatch.dylib                   0x0000000192b07ab4 <redacted> + 732
2016-10-04 15:41:51.120 JUser[3163:1136833] critical: 11  libdispatch.dylib                   0x0000000192b0938c <redacted> + 572
2016-10-04 15:41:51.120 JUser[3163:1136833] critical: 12  libdispatch.dylib                   0x0000000192b090ec <redacted> + 124
2016-10-04 15:41:51.120 JUser[3163:1136833] critical: 13  libsystem_pthread.dylib             0x0000000192d012c8 _pthread_wqthread + 1288
2016-10-04 15:41:51.121 JUser[3163:1136833] critical: 14  libsystem_pthread.dylib             0x0000000192d00db4 start_wqthread + 4
2016-10-04 15:41:51.121 JUser[3163:1136833] critical: 
=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

我尝试将代码包装在try catch中,但仍然遇到崩溃问题。知道可能是什么问题吗?

1 个答案:

答案 0 :(得分:2)

我找到了解决方案以防其他人遇到同样的问题。您需要将带有文本说明的[Pri​​vacy -Microphone Usage Description]属性添加到info.list,以便应用程序会要求您允许访问权限麦克风。