Android Question play music only once not twice ?

achtrade

Active Member
Licensed User
Longtime User
I'm playing a mp3 file, it's 30 secs lenght but I only need to play 15 secs, so, after 15 secs I use MP.Stop, but I want to play it again for 15 secs from the beginning but it didn't work.

I'm using MP.Position = 0 with no luck.

any suggestions ?


B4X:
Sub Activity_Create(FirstTime As Boolean)
    If FirstTime  Then
  
        MP.Initialize2("MP")
        MP.Load(File.DirAssets, "01.mp3") 'it's 30 secs lenght
end if
 
End Sub
 

ibra939

Active Member
Licensed User
Longtime User
I'm playing a mp3 file, it's 30 secs lenght but I only need to play 15 secs, so, after 15 secs I use MP.Stop, but I want to play it again for 15 secs from the beginning but it didn't work.

I'm using MP.Position = 0 with no luck.

any suggestions ?


B4X:
Sub Activity_Create(FirstTime As Boolean)
    If FirstTime  Then
 
        MP.Initialize2("MP")
        MP.Load(File.DirAssets, "01.mp3") 'it's 30 secs lenght
end if

End Sub
thanks
 
Upvote 0
Top