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 / Android 6 Marshmallow App sound changes

Author
Message
niansenx
8
Years of Service
User Offline
Joined: 29th Jan 2016
Location:
Posted: 26th May 2016 10:39
Hello

I've just updated my phone to Android 6 and I've noticed that my AppGameKit game has some sound issues. The game seems to work fine, but some of the sounds have reduced in volume to the point you can't hear them, some are much louder, and some sound like they are playing twice.

Has anyone else had this experience? Maybe there was a change in Android 6 that altered the way sounds are played that's not quite compatible any more, and perhaps an update to the compiler is needed.

I'm not sure. Any help would be appreciated!

Thanks.
James
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 26th May 2016 20:40
I tested on a Nexus 5 with Android 6 and couldn't notice anything out of the ordinary, but I only had one sound effect played multiple times.
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 26th May 2016 20:59
Quote: "Any help would be appreciated!"

We'd need to see some source code to help. Perhaps you have a sound playing in a loop so it IS actually playing multiple times on top of itself (leading to strange volume effects etc.). Without source code, we can only guess.
V2 T1 (Mostly)
Phone Tap!
Uzmadesign
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 26th May 2016 21:15
Quote: "We'd need to see some source code to help. Perhaps you have a sound playing in a loop so it IS actually playing multiple times on top of itself (leading to strange volume effects etc.). Without source code, we can only guess."


That's very possible. Like different systems could do that differently. On my PC, sounds seems louder if multiple instances are played at the same time.
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 27th May 2016 09:43
Remember, to play sounds on key/button release, not on key state/pressed.
niansenx
8
Years of Service
User Offline
Joined: 29th Jan 2016
Location:
Posted: 27th May 2016 10:42
Hello

This is a weird one. I've attached some code and two wav files that I'm using. All the code does is detect a touch on the left or right hand side of the screen and play either sound. The boing sound seems to be okay, but the knock sound seems muted, it's missing its kick, the crispness of the sound has gone. These sounds are used in my game, and they are definitely not triggered twice. The thing is, my game's sounds were absolutely fine until I upgraded to Android 6, and I haven't changed any of my code. Several of the sounds in my game sound different, some are much quieter, some sound almost like it's the reverb of the sound thats playing with no dry sound at all.

I don't think I can actually let you hear the sounds and the difference. It's hard to explain, but since I upgraded to Andoid 6, the sounds in my app have changed. I can play my game on my samsung tablet, which is Android 4, and the sounds are fine.

Not sure what else I can add, just hope someone with Android 6 can hear the difference.

This is a tricky one!

James

Attachments

Login to view attachments
niansenx
8
Years of Service
User Offline
Joined: 29th Jan 2016
Location:
Posted: 27th May 2016 11:03
I think I may have worked out what's going on. I wondered if maybe the sound playback is missing the first fraction of a second at the start of the sound. So I tried inserting a fraction of a second of silence at the beginning of the knock sound and now it seems to sound okay.

I wonder if anyone else has had a similar issue, or whether this is just something unique to my setup and hardware.

James
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 27th May 2016 12:48
The issue is that you are playing the same sound 60 times a second (or whatever your refresh rate is set to) whilst your finger is on the screen (or mouse button is pressed). See Mobiius' response above. You need to check for the press, not the state. Change GetPoitnerState to GetPointerPressed.
V2 T1 (Mostly)
Phone Tap!
Uzmadesign
niansenx
8
Years of Service
User Offline
Joined: 29th Jan 2016
Location:
Posted: 27th May 2016 13:20
No that's not it. I put a lock variable in to prevent that happening.

I have now inserted a tiny bit of silence before each sound effect in my game and they are sounding normal now. I also tested this on someone else's Samsung S6 which also had the same problem. I think the upgrade to Android 6 is causing AppGameKit sounds to miss the first fraction of a second when playing.

I wonder if anyone else has had a similar issue.

Login to post a reply

Server time is: 2024-09-29 15:21:09
Your offset time is: 2024-09-29 15:21:09