Soundpool problem

OldVic

Member
Licensed User
Longtime User
I'm using Audio library 1.3 and setting up sounds like LoadDing=SP.Load(File.DirAssets,"Ding.wav") and SP.initialize(4).

I play sounds with commands like PlayDing=SP.Play(LoadDing,1,1,1,0,1).

This works as expected (plays once) with any emulator or tablet. On a Samsung Galaxy all sounds are played twice. I've also been told that sounds repeat forever on other Smartphones.

How can I make it work for any Android phone?
 

OldVic

Member
Licensed User
Longtime User
Seems like a bug in the native SoundPool: android - Issue with Soundpool and Samsung Galaxy S - Stack Overflow
The possible solution is to use OGG files instead of wav.
Thanks for pointing me in a different direction. I converted my wav files to ogg but got a "Not found" message. I tried a different download ogg file but got a "program paused" message. When I converted to MP3 files and used SoundPool I got the desired one-time sound on the Galaxy (success). Your MediaPlayer also worked correctly with MP3 or wav files too.
 
Upvote 0
Top