AudioUnitInitialize失败,错误代码1701737535'ent?'报警中断后 [英] AudioUnitInitialize failed with error code 1701737535 'ent?' after alarm interruption

查看:348
本文介绍了AudioUnitInitialize失败,错误代码1701737535'ent?'报警中断后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用VOIP应用程序.该应用程序可与CallKit正常运行.

I am working with VOIP app. The app is working fine with CallKit.

如果在通话中触发警报,我将面临一个问题.每次警报停止触发(音频中断结束)时,我们都尝试在AVAudioSession上设置Active :.但是它始终会给出错误代码1701737535,即. 输入?".

I am facing an issue if alarm fires within call. Every time when alarm stop firing (Audio Interruption ends), we are trying to setActive: on AVAudioSession. But it always gives an error with code 1701737535 ie. 'ent?'.

当我尝试初始化音频单元时,会发生相同的错误. 如果不使用CallKit,它就可以正常工作.

The same error occurs when I am trying to initialize Audio Unit. Without using CallKit it's working fine.

当音频中断结束时,任何人都无法激活音频会话.

Anybody faced issue with activating Audio Session when Audio Interruption ends.

在相同的情况下,我收到不同的错误'!pri'561017449,但这一次是由于本机电话"应用程序引起的中断.

I am getting different error '!pri' 561017449 in the same scenario but this time Interruption occurred because of the Native Phone app.

问题是100%可复制的.尝试了很多命中&诸如线程,延迟或调用setActive:YES之类的跟踪,而无需调用setActive:YES.但没有运气.

Issues are 100% replicable. tried with many hit & trails like thread, delay or calling setActive:YES and without calling setActive:YES. But no luck.

在这里总结:

  1. 获取错误1701737535,即"ent?"如果由于警报而中断.

  1. Getting error 1701737535 ie. 'ent?' if interruption because of ALARM.

获取错误561017449,即'!pri'如果由于本地通话而中断

Getting error 561017449 ie. '!pri' if interruption because of Native Call

仅在将CallKit与VIOP一起使用时进行复制.

Replicating only if using CallKit with VIOP.

任何人的帮助.

推荐答案

我遇到了同样的问题,我发现并与我合作的解决方案是在报告新呼叫之前启用音频会话.

I've run into the same issue, the solution I've found and worked with me is to enable Audio session before reporting your new call.

// Activate audio session
  do {
    try AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayAndRecord, mode: AVAudioSessionModeVoiceChat, options: [.mixWithOthers, .allowBluetoothA2DP])
    try AVAudioSession.sharedInstance().setActive(true)
  } catch {
  }
  provider.reportNewIncomingCall(with: currentCallID, update: update, completion: { error in })

这篇关于AudioUnitInitialize失败,错误代码1701737535'ent?'报警中断后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆