Still new at this, and I tried Google without results.
Finally finished a game tutorial and ready to try my own. However, I noticed that when I run the game built from the YouTube tutorial it shuts off the iPhones music player. Now while the game does use sounds it doesn't used them till way into the game.
Yet still at the game startup, the music is cut off.
So is there a way to program my game to detect that there's music playing and not use any sound, or a lower sound without shutting off the music player?
Thank you
Finally finished a game tutorial and ready to try my own. However, I noticed that when I run the game built from the YouTube tutorial it shuts off the iPhones music player. Now while the game does use sounds it doesn't used them till way into the game.
Yet still at the game startup, the music is cut off.
So is there a way to program my game to detect that there's music playing and not use any sound, or a lower sound without shutting off the music player?
Thank you
Without more details about what your code is doing, I can only guess that your audio session category is set to one which interrupts other audio when your app's session goes active. I suggest reading through the documentation here:
https://developer.apple.com/documentation/avfoundation/avaudiosession/category
https://developer.apple.com/documentation/avfoundation/avaudiosession/category