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.

AppGameKit Classic Chat / Sounds not stopping when pressing home key (Android)

Author
Message
Funnell7
13
Years of Service
User Offline
Joined: 8th Sep 2011
Location: UK, England
Posted: 6th May 2013 20:48
I know this has been mentioned a couple times, but I'm not sure if a bug was ever raised. I tried searching for one, but couldn't find anything...

When you press the home key (Android) sounds do not stop playing. This is an issue only with sounds, music behaves as expected...

I have added a defect on the bug board - Issue Number 556. AL (or any of the other community testers), I'd appreciate it if you could confirm this as a bug so we can hopefully get this fixed for the next beta...
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 6th May 2013 21:29
Are you playing an APK directly on the device or using broadcast with a Player?

Or are you using Tier 2?

I just tested in my Tier 2 WIP on my Samsung Galaxy S III Android 4.1.1 and Nexus 7 Android 4.2.2 and the sounds continued for a little bit after the home button was pressed, but then stopped.

How long does the sound keep playing after you hit the home button?

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Funnell7
13
Years of Service
User Offline
Joined: 8th Sep 2011
Location: UK, England
Posted: 6th May 2013 21:45
Playing APK directly on the device. I'm using the 108b11 interpreter_android_prebuilt folder via eclipse.

Tier 1 on a Samsung S4 running 4.2.2.

The sound continues until I force close, or go back into the app and quit. I let it run for a good few minutes (until I got bored of listening to the same sound )...
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 6th May 2013 22:59
Okay, I just tested using the correct Player for v10811 (from the Play Store) and had no problem.

I just created a very simple app that loads a sound, starts it looping and then just waits for the user to touch the screen to exit.

Once running, with the sound looping, I pressed the home button and the sound stopped immediately.

Now, I was playing a very short sound, but it still stopped before the end of the sound.

If you want to post the sound you are using that keeps playing, I will test that.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Funnell7
13
Years of Service
User Offline
Joined: 8th Sep 2011
Location: UK, England
Posted: 6th May 2013 23:15 Edited at: 6th May 2013 23:26
Thanks AL... I'll continue messing around too. It's quite possible that its something I've done (or not done?!)...

Just to confirm, you are using PlaySound, right? And not PlayMusic?

I also have this sound set up to loop, would you mind trying this, in case that makes any difference?

Thanks for taking a look at this AL...

EDIT: I think I may have made a development. It appears that the sound stops only after it has reached the end. So if you play a 20 second sound, press the home key after 5 seconds, the sound will continue for a further 15 seconds until it reaches the end...
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 6th May 2013 23:37
Yup, just plain old PlaySound.

I suspected it was a length of file thing. It is probably because the app starts a process to play the sound and then lets it go. And when the app gets sent to the background, it doesn't necessarily suspend all the processes it starts.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Funnell7
13
Years of Service
User Offline
Joined: 8th Sep 2011
Location: UK, England
Posted: 6th May 2013 23:46 Edited at: 7th May 2013 00:01
Yeah, I suspect that's it too... Do you agree this should be considered a bug? I don't think there is a workaround for this...

I need to remove the mp3's from my game (due to the license etc), but I really don't want the sound to continue when the user closes the app, that's not good at all...

EDIT: Woooaaa... I thought I read somewhere that PlayMusic only supported mp3 files, but it doesn't, I can play wav files too (I'm such a donut!)... That solves my problem, PlayMusic works just fine so I can continue to use that instead. Thanks all the same AL. If you agree that this a bug, we may as well leave it open for Paul to take a look...
JimHawkins
15
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 7th May 2013 01:48
Okay - I suspect that PlaySound() buffers the entire data in memory, so it's going to run to the end of the buffer before the audio sub-system signals that it's reached the end.

Twenty seconds is quite long for SFX play!

-- Jim DO IT FASTER, EASIER AND BETTER WITH AppGameKit FOR PASCAL
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 7th May 2013 17:10
I just officially confirmed the issue as a but in the google and TGC AppGameKit CT sites.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Funnell7
13
Years of Service
User Offline
Joined: 8th Sep 2011
Location: UK, England
Posted: 7th May 2013 17:30
Thanks AL!

@JimHawkins, yeah, I was trying to use PlaySound for my level music wav file (about a minute long) as for some reason I thought PlayMusic only worked with .mp3 files...
AgentSam
12
Years of Service
User Offline
Joined: 14th Mar 2012
Location: Virtual Space
Posted: 20th May 2013 03:20
Quote: "I just officially confirmed the issue as a bug in the google and TGC AppGameKit CT sites."


I need to butt in here for a moment, to ask about this CT site!

Ancient Lady, I often keep seeing you refer to the TGC AppGameKit CT (Community Testers) site. Can you explain what the TGC AppGameKit CT site actually IS. It must be something
I've never seen since I'm not a community tester myself. So, I'm just curious.

Has TGC created a CT site (that somehow facilitates checking the bug submissions) or are the CTs just using the same AppGameKit buglist the rest of us are, and if so, why refer to it as the "CT site"?

Cheers,
AgentSam - The curious old software engineer

"TGC AppGameKit CT, now that's quite an acronym."
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 20th May 2013 04:40 Edited at: 20th May 2013 04:40
TGC did not create this site, I did. It only took a day or so to get it up and running.

I built the TGC AppGameKit CT site for use by the CTs. It is a place where only bug issues were dealt with and where we could track what we were doing related to bugs and who was looking into each issue so that we wouldn't duplicate work.

Basically when a CT decides that an issue posted in the Google list needs to be investigated and confirmed or denied, an entry is made in the site. Then whichever CT that has taken responsibility for deciding if the issue is a legitimate bug uses the site to post comments and code that either proves or disproves the issue. Sometimes code presented by the issue poster is sufficient. But it needs to be tested to see if it performs improperly in other environments and to see if it is just a usage issue on the part of the issue poster. Stuff like that.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master

Login to post a reply

Server time is: 2024-11-24 14:57:54
Your offset time is: 2024-11-24 14:57:54