Hello
in an old topic, member pluton has specified a code to play random mp3 files that working perfectly:
I just want the player not play the same files 2 times in a row. for example laz_2 will not play again(Laz_1 ,3 or 4 must play) if previous played file was laz_2
ty
in an old topic, member pluton has specified a code to play random mp3 files that working perfectly:
B4X:
Sub random_Click
Dim i As Int
i = Rnd(1,4) ' random number from 1 to 4
mediaplayer1.Load(File.DirAssets, "laz_"&i&".mp3") ' load our mp3 with random number
Timer1.Initialize("timer1", 1000)
MediaPlayer1.Play ' media is playing
timer1.Enabled = True
ToastMessageShow("Now is playing laz_"&i&".mp3", False) ' just check to see what is playing
End Sub
I just want the player not play the same files 2 times in a row. for example laz_2 will not play again(Laz_1 ,3 or 4 must play) if previous played file was laz_2
ty