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 / PlaySound FPS microstutter

Author
Message
Zaxxan
Developer
4
Years of Service
User Offline
Joined: 17th Nov 2020
Location: England
Posted: 17th Aug 2023 15:28 Edited at: 17th Aug 2023 16:13
I usually play the card games that I have developed with the sounds effects off and all of the tweens are very smooth. If I turn the sound effects on which use the playsound command to play ogg samples I've noticed that there is microstutter, this is confirmed by monitoring the number of FPS which drops by 2 or 3 frames when a sound effect is played. If I turn the sound effects off the FPS is constant. The issue only seems to affect some android devices which includes my own phone. I have searched for this issue and it appears that it was first reported in about 2020 and Paul was supposed to do a fix. Has this not been done? This is quite an annoying problem. I have tried playing the sound effects using the playmusic command but the samples are too short (minimum length 0.5secs). In the current situation is this likely to be fixed?

Just found this which may be the same problem. Doesn't look very promising as it looks like it may be a long standing bug that TGC have chosen not to fix.

https://forum.thegamecreators.com/thread/228564
Aidan
User Banned
Posted: 17th Aug 2023 16:12
Hello.

I'm not sure if this as anything to do with anything

https://forum.thegamecreators.com/thread/228903#msg2673203

To do with sound on Android but this is in the studio version so maybe same in classic, maybe fix on next update, I wouldn't have any idea.

Maybe raise a GitHub issue if one doesn't already exist
Zaxxan
Developer
4
Years of Service
User Offline
Joined: 17th Nov 2020
Location: England
Posted: 17th Aug 2023 16:17 Edited at: 18th Aug 2023 03:52
Hi Aidan, Paul mentions that AppGameKit uses an out dated sound library and that he doesn't know if there are plans to replace it. As AppGameKit doesn't make any money now that will probably be a no unfortunately. From the searches I have done a GitHub issue was raised over 3 years ago.

https://github.com/TheGameCreators/AGK-Studio/issues/680#issuecomment-652415793
Zaxxan
Developer
4
Years of Service
User Offline
Joined: 17th Nov 2020
Location: England
Posted: 17th Aug 2023 17:13
Title should say Playsound not playspound lol. Virtual Nomad, can you change this for me please?
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 19th Aug 2023 00:27 Edited at: 19th Aug 2023 00:34
title changed.

meanwhile, it might help to pad the sfx with silence to get them over the 0.5 PlayMusic(ogg?) threshhold you mentioned?

i can't see it being a real fix but it may help. IIRC, this was the latest approach to fixing where the silence was added internally? maybe get it over the 1.0 mark?

i also can't say i've seen too much of an attempt from our end to work around it or at least a more creative approach.

ie, have you ever noticed that while a given build is running, you cannot modify/delete music that is being played? does this mean the file itself is accessed after it's loaded for some reason?

so, what if they media was never on disk, as is, but instead created @ runtime?

i'm thinking media banks or loading memblocks, etc. it MAY make a difference and might be worth testing along with any other ideas.

and, this thread might inspire (this thread reminded me of it).

/2ยข
Zaxxan
Developer
4
Years of Service
User Offline
Joined: 17th Nov 2020
Location: England
Posted: 19th Aug 2023 05:52
Hi Virtual Nomad, I did consider padding out the samples but I'm not sure if it would work. I went to a lot of trouble to get the sound effects length to match the tween times which are mostly 0.2 to 0.3 secs. I'll probably give it ago though.

Login to post a reply

Server time is: 2024-11-21 15:47:51
Your offset time is: 2024-11-21 15:47:51