Soundpool overlapping sounds with erratic volume spikes

22 views Asked by At

we use Soundpool for playing short sound effects that need to be played almost instantly. Effects are in wav format of size from 16-32kb.

We set soundpool with 10 max streams and preload each sound that we need. When we need to play for example a key press sound effect we issue soundpool.play with preloaded soundId. All fine.

Normally if we play one by one with enough key press delay the sounds play perfectly, but if user clicks under 300ms twice the first sound is played on a normal volume then all subsequently in a noticeably higher volume. Until the delay between key presses increases. Which is insanely annoying.

We have a device with api 26 android 7 where this works perfectly, then we have android 11 device where first sound play is very low volume and after that all normal, and a android 10 api29 device that increases volume if presses are not enough far apart.

We tried stopping streamid before playing next soundid and did not help. Buggy as hell. All sounds are played with 1.0f volume and all with same priority. We even tried changing the maxstreams to 1. Nothing helps.

Does anybody have any other suggestions or is the device image somehow broken on those that it does not work.

Do we have any alternative?

Thank you

0

There are 0 answers