Dim minLevel as int = 1
Dim ph As Phone
Dim channel As Int = ph.VOLUME_MUSIC '--- use this audio channel
Dim origVol As Int = ph.GetVolume(channel) '--- save current vol
Dim nMax As Int = ph.GetMaxVolume(channel) '--- max int of channel
ph.SetVolume(channel, minLevel, False) '--- try and set to minimum level
Log("max vol: " & nMax)
Log("original vol: " & origVol)
Log("after set vol: " & ph.GetVolume(channel))
'--- play sound
PlaySound("swipe.mp3")
'--- reset to previous volume
ph.SetVolume(channel,origVol, False)
return
Public Sub PlaySound(sfile As String)
mp.Initialize2("mp")
mp.Load(File.DirAssets,sfile)
mp.Play
End Sub
Private Sub MP_Complete
mp.Release
End Sub