HI Folks, two questions about Gideros and Audio:
1. I notice that when I start my App on iOS it grabs exclusive use of the phone's the audio: music that was playing at the time was paused. My app doesn't actually use anything Audio at the moment. Is there a way to prevent my app grabbing the audio in this way?
2. Is it possible to have non-exclusive audio in an app? That is, any audio my app uses is played in its own channel over the top of any background audio such as music.
cheers,
-Brendan
Comments
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
At the starting of an app, we only initialize OpenAL and do nothing else. Most probably this action pauses the music. I can defer the OpenAL initialization so that if you're not using any audio, the music will continue to play without interruption.
http://bugs.giderosmobile.com/issues/112
Likes: chipster123
Words With Friends used to pause audio whether you had audio enabled in the app or not - was very annoying :-)
Likes: atilim
I'm really not sure about best practice for audio but I imagine more audio control options, especially how it interacts with other apps or minimized, could only be a good thing.
But after your post, I think http://bugs.giderosmobile.com/issues/116 won't be a useful feature because when an gideros app goes to background, it doesn't dispatch any events (no enter frame, timer, touch events). Therefore, it won't be possible to control the background music. And it seems it's hard to remove this limitation.
Regarding 112 though, the way its worded sounds like when you do initialize audio the background audio will still be silenced? Is that the case or will it allow your sounds to play over background noises?
If it will mute background music, just when you initialize (create Sound object), then it might not do any good, because probably everyone will load their sounds on app init and only play them, if and when sound is enabled inside application.
I had a look at the XCODE version created by Gideros, and the change to make this happen is a simple one... in AppDelegate.m simply change
currentAudioSessionCategory = AVAudioSessionCategorySoloAmbient;
to
currentAudioSessionCategory = AVAudioSessionCategoryAmbient;
I suppose you have to do this every time you export from Gideros to XCODE, or at least prior to production version. Haven't done an Android version yet, so don't know the fix there.
Might it be possible to build these selections into Gideros in a future version?
Meet Kate. Grey is her favourite colour. Maths is her favourite subject. Decency is her favourite type of behaviour.
She definitely does not like jewellery or modelling, but loves aeroplanes and other machines made of aluminium.