If SoundOn Then
Dim fileName As String
Select True
Case Speed = 0
fileName = "idle.wav"
Case Speed > 0 And Speed <= maxSpeed * .33
fileName = "offlow.wav"
Case Speed > maxSpeed * .33 And Speed <= maxSpeed * .66
fileName = "onlow.wav"
Case Speed > maxSpeed * .66 And maxSpeed <= maxSpeed
fileName = "onhigh.wav"
End Select
If fileName = LastSoundFile Then Return
LastSoundFile = fileName
If MP.IsPlaying Then MP.Pause
MP.Load(File.DirAssets, fileName)
MP.SetVolume(1,1)
MP.Looping = True
MP.Play
End If