Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Android / audio continues when receiving call ... any help please?

Author
Message
miki
19
Years of Service
User Offline
Joined: 7th Jan 2005
Location:
Posted: 16th May 2013 09:17 Edited at: 16th May 2013 09:31
Hi,

I recently submitted a game to Amazon and they tested it on a Samsung4 'phone.
They said the audio continues when they receive a call.

How can I fix this?

EDIT: Could it be something to do with the obsolete 2.3 API?

Thanks,
miki.

AGK: Beta11

in the end
Funnell7
13
Years of Service
User Offline
Joined: 8th Sep 2011
Location: UK, England
Posted: 16th May 2013 14:46
Miki, when you say Audio, are you referring to PlayMusic() or PlaySound()?

PlayMusic() should (and does in my project AppGameKit b11) stop playing when you receive a phone call or the app goes to the background. However, there is a known issue with PlaySound() where the sound does not stop until it has reached the end of the sample, the bug has been reported on the bug board (number 556).
miki
19
Years of Service
User Offline
Joined: 7th Jan 2005
Location:
Posted: 16th May 2013 15:24
@Funnell7
Thanx for the reply..

I'm using

b4 the main loop.

if i use

inside the main loop
or

before the main loop.

I get a pause before the loop which is really annoying.

The music is really short so I thought it would be okay.

Is there any way round it?

in the end
Funnell7
13
Years of Service
User Offline
Joined: 8th Sep 2011
Location: UK, England
Posted: 17th May 2013 12:30
Hello miki, I'm not aware of any workaround unfortunately. What I do is use PlayMusic() for any lengthy tracks, and PlaySound() for sound effects only i.e. sounds of < 1 or 2 seconds...

What do you mean by 'I get a pause' when you use PlayMusic(), do you mean there is a delay in when the music starts?
miki
19
Years of Service
User Offline
Joined: 7th Jan 2005
Location:
Posted: 17th May 2013 13:12
Quote: "What do you mean by 'I get a pause' when you use PlayMusic(), do you mean there is a delay in when the music starts?"



There is a delay at the beginning of every loop ... (was)
Solved it with ...



Thanks for the interest,
miki.

in the end

Login to post a reply

Server time is: 2024-11-23 12:00:58
Your offset time is: 2024-11-23 12:00:58