79169187

Date: 2024-11-08 07:49:37
Score: 4
Natty:
Report link

am facing the same with playSoundFileNamed , that is no sound after phone call with SKAction.playSoundFileNamed.

After testing a bit, i found that minimizing the app and coming back, doing this twice returns the audio. Or locking and unlocking the phone twice returns back as well.

I was wondering what is happening with the AVAudiosession or audioengine that doing the minimize/maximize app twice resolves this. Was looking at category, mode change of AVAudioSession during the process, it remains the same. Only thing is audioengine is not running when we recieve the phone call for like 10 frames but then it starts running automatically after and with no sound on playsoundfilenamed.

What can we do in handle interruptions such that when it ends, we get the same thing that is happening on 2nd minimize, maximize. I was going to comment but stack overflow needs 50 reps for that.

Reasons:
  • Blacklisted phrase (1): to comment
  • Blacklisted phrase (2): was wondering
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Kunal Verma