Android sounds not always playing

Previous topic - Next topic

MrPlow

Hi

I am using stopsound to help create a audio effect in my app but notice this affects other channels as well as my intended sound.
Any idea of how to improve or guarantee a sound playing?
BTW - only happening so far with the mobile version
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

erico

I experienced some trouble with android sounds too in the past.
Mostly, sounds that were short in length (like half a second and less) and got played and stopped very fast didn´t work out, It ended up not playing some of the samples (imagine a machine gun sound). That didn´t happen on pc of course.

Can you be more specific? If you have code and needs testing I can give a hand.

In my case, I ended up changing those sounds until I got into a "working" condition.

MrPlow

Yeah, I might change around the sounds and maybe increase sound length.
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

spacefractal

im experirede that very early as well in Greedy Mouse. So......

what im did as im remember was just make sure samples is about 2 secs in length. if they are shorter, just add empty bit too it. Im are not sure how short they can been unclipped.

Soundpool from AndroidExtras does not have this issue.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

erico

Exactly, increase sound length with silence and add the 4 buffers so they can play together overlapping from a single playsound call.
Gotta be aware not to go over the buffer limits per sample or you can design a sound system with multiple playsound calls.

MrPlow

Anyone notice multiple (over 20) instances of adb.exe with their Android Studio setup?!

Erico, I think your Burger time (modified for mobile or used as a remake for original game) would do well on Playstore and you could put an Interstitial ad into it easily.

:)
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

erico

I have the burger and the avocado game ready for android, as far as coding, controls and screen goes. I have no idea on how to add the ads.
I still have to save for the android license but I struggle between making another PC game against taking time to finish the android port.
Most probably before march I can come up with something, then I will come around pestering you guys for advises! :)

spacefractal

adb.exe used when you launch your emulator and install on your phone. no idea how its works instance wice.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

MrPlow

On monday - I will post how to add the ads - it's quite straightforward...

Quote from: erico on 2019-Nov-14
I have the burger and the avocado game ready for android, as far as coding, controls and screen goes. I have no idea on how to add the ads.
I still have to save for the android license but I struggle between making another PC game against taking time to finish the android port.
Most probably before march I can come up with something, then I will come around pestering you guys for advises! :)
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs