@ Paul,
I have found a couple of commands which work OK in windows but when broadcast to the Android Player fail to operate correctly.
1. GetMusicDuration() when using the Demo file "music.mp3" the example below gives the correct value of 177 seconds in Windows, but on Android 2.3.3 and 4.0.3 I am getting a number way bigger than that (in the thousands)!
Setvirtualresolution(640,480)
ResetTimer()
//Check for required files in media folder
fileok=GetFileExists("music.mp3")
If fileok<>1
Repeat
Print ("music.mp3 needs to be in your media folder")
Sync()
Until Timer()>5
EndIF
If fileok=1
AddVirtualButton(1,200,240,80)
SetVirtualButtonText(1,"Pause")
AddVirtualButton(2,400,240,80)
SetVirtualButtonText(2,"Resume")
AddVirtualButton(3,600,440,80)
SetVirtualButtonText(3,"Quit")
id = LoadMusic("music.mp3")
PlayMusic(id)
duration#=GetMusicDuration(id)
Repeat
Print("Music Play Length: "+Str(duration#)+" Seconds")
If GetVirtualButtonPressed(1)
PauseMusic()
EndIf
If GetVirtualButtonPressed(2)
ResumeMusic()
EndIf
Sync()
Until GetVirtualButtonPressed(3) OR Timer()>duration#
DeleteMusic(id)
Print ("Music Deleted")
Sync()
Sleep(2000)
EndIf
End
2. SeekMusic(), under Android the Relative Mode of this command is acting in the same way as Absolute Mode. Tested on Android 2.3.3 and 4.0.3, however it works as expected in Windows. [
UPDATE: Fixed in V2.0.11]
In the example the Skip Fwd button should skip the music forward 10 seconds from the present position, but under Android it just seeks to start+10 seconds.
Setvirtualresolution(640,480)
//Check for required files in media folder
fileok=GetFileExists("music.mp3")
If fileok<>1
Repeat
Print ("music.mp3 needs to be in your media folder")
Sync()
Until Timer()>5
EndIF
If fileok=1
AddVirtualButton(1,200,240,80)
SetVirtualButtonText(1,"Rewind"+Chr(10)+"Start")
AddVirtualButton(2,400,240,80)
SetVirtualButtonText(2,"Skip"+Chr(10)+"Fwd")
AddVirtualButton(3,600,440,80)
SetVirtualButtonText(3,"Quit")
Id=LoadMusic("music.mp3")
PlayMusic(Id)
Repeat
Print("Current Music Position: "+Str(GetMusicPosition(),1)+" Seconds")
If GetVirtualButtonPressed(1)
//Seek back to 0 seconds, absolute (the beginning)
SeekMusic(0,0)
EndIf
If GetVirtualButtonPressed(2)
//Seek forward 10 seconds, relative (skip forward)
SeekMusic(10,1)
EndIf
Sync()
Until GetVirtualButtonPressed(3)
DeleteMusic(Id)
Print ("Music Deleted")
Sync()
Sleep(2000)
EndIf
End