Music cut off when app starts
Monkey Targets Forums/iOS/Music cut off when app starts
| ||
Background music, such as iTunes will be cut off when the app first launches. If it's already started it continues to play as expected (with siread's 'magic' code that is already implemented). So how can we make it so background music is never cut off? PS: Using monkey v78h |
| ||
*push |
| ||
Is everybody shipping their games with this behaviour? |
| ||
Yep. No idea to change it so it stays. |
| ||
I did not even notice that. Good lord Apple doesn't make this a requirement. I think Microsoft have some rules about that. |
| ||
Did anyone ever find a fix for this? |
| ||
I was going to have a poke/prod myself, a few months ago, then iOS10 turned up and I thought "meh, leave it until that's settled.. It'll probably break something!" I haven't bothered to even try, yet! |
| ||
I found a solution, but it involves a change to the target, I'll post it when I am on my main computer that has monkey. |
| ||
if you go to modules > native > monkeytarget.cpp you will find “didFinishLaunchingWithOptions” method. Just in the beginning of it I have added: [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryAmbient error:nil]; |
| ||
Awesome. Thankyou. You've (hopefully) saved me a good few days of trial and error ;) |
| ||
Thanks again, by the way. I finally (only just!!) got around to testing this last night, and it does indeed work a treat. So, thought I'd pop back in and say thankyou again for the advice. Now I just need to fix the other 1,000 tweaks that Apple have made since I last compiled an iOS game. .. Oh, joy, more icons! Woohooo!! |