Hey,
I've got a problem in my app that I can't reproduce so it's a bit difficult.
I'm using SoundPool and set the maximum number of simultanous streams to 15 (which is never reached). But I don't know which is the maximum number that could happen so I set it high. At my device everything works, but on the devices of two friends, there is the problem that at some point (not reproducable) the sound is played but then there starts a loud noise sound. I guess the length of that noise is as long as one of the sounds is playing. As far as I know, they are using Android 6 (I've got an "older" device too with Android 6, but can't get that error).
My question: Is it possible that on older devices the maximum number of soundpool sounds is limited and then it is coming to that error with the noise sound? Maybe because too much sounds are overlapping? I did not using the priority of the sounds, every sound has the same priority, is it possible that that could fix this error?
Is this a known error or did I discovered first? Can I name it? ?
*Edit*
I have just noticed that I use PlayIDs more than once, can this be the reason?
I've got a problem in my app that I can't reproduce so it's a bit difficult.
I'm using SoundPool and set the maximum number of simultanous streams to 15 (which is never reached). But I don't know which is the maximum number that could happen so I set it high. At my device everything works, but on the devices of two friends, there is the problem that at some point (not reproducable) the sound is played but then there starts a loud noise sound. I guess the length of that noise is as long as one of the sounds is playing. As far as I know, they are using Android 6 (I've got an "older" device too with Android 6, but can't get that error).
My question: Is it possible that on older devices the maximum number of soundpool sounds is limited and then it is coming to that error with the noise sound? Maybe because too much sounds are overlapping? I did not using the priority of the sounds, every sound has the same priority, is it possible that that could fix this error?
Is this a known error or did I discovered first? Can I name it? ?
*Edit*
I have just noticed that I use PlayIDs more than once, can this be the reason?
B4X:
Sub PlaySound(id As Int)
If Sound = True Then
Select id
Case 0
PlayAchievemntID = SP.Play(LoadAchievementID,1,1,1,0,1)
Case 1
PlayID1 = SP.Play(LoadID1, 1, 1, 1, 0, 1)
Case 2
PlayID1 = SP.Play(LoadID2, 1, 1, 1, 0, 1)
Case 3
PlayID1 = SP.Play(LoadID3, 1, 1, 1, 0, 1)
Case 4
PlayID2 = SP.Play(LoadID4, 1, 1, 1, 0, 1)
'...'
End Select
End if
End Sub
Last edited: