I am using SoundPool to play wav file (in side service)
and the wav is cut in the middle of playing
any way to solve this?
B4X:
If AlreadyPlay = False Then
If Area=True Then
If Main.Sound > 1 Then
ph.Vibrate (1000)
Log("Play..")
SP1.Play(LoadId1, 1,1,2,0,0)
End If
ToastMessageShow(Location, True)
ToastMessageShow(Location, True)
AlreadyPlay=True
' WriteToLog
Log("Alarm in all areas !!!")
End If
End If
It could be a file format issue, not all devices can play all format of files. You could try compressing the files with Ogg and using media player. That seems to be the best supported format. And will make your APK considerably smaller. Although you still may need to change the formatting (mainly the sample rate causes issues)