Hello,
We are also facing the same issue. Upon testing, we found that as soon as avaudiosession setactive becomes false, there is no way to get audio from Skaction playsoundfilenamed during the app.
Further testing found that, minimizing maximizing the app, twice, brings back the audio. Which is hope giving but not the solution.
So whatever the system is doing during that two times of minimize and maximize needs to be done in ended of handleinterruption so as to get back audio. Or get back audio after setActive false of a AvAudioSession. SetActive true during app does not works only that after setting true , this minimize/maximize things work.
have tested Scenekit, Realitykit, Spritekit audio , 3rd party audioengine for our audio needs. Scenekit audio works with phone calls fine but has some memory issues which can be managed but not as ideal as spritekit.
Realitykit audio is great but handling memory is scary sometimes and the above issue happens but can be removed by creating a new instance ( but memory increases with app minimize maximize which can be resolved with singleton then) which is not working with spritekit as some allocation of playsoundfilenamed is persitent within the app. Does not deallocates.
3rd party audioengines crash sometimes on phone call. Atleast Apple APi's dont crash. Hopefully this gets resolved and will be a great thing if there are no more issues also.
Topic:
Graphics & Games
SubTopic:
SpriteKit
Tags: