The fastest way to get an audio response, that I have found is by pre-loading an audio file, then using Touch action in a panel to play it with MediaPlayer. However there is still a slight delay.
Is there any faster method that anyone knows of?
Is there any faster method that anyone knows of?
B4X:
Sub Globals
Dim MP As MediaPlayer
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Main")
MP.Initialize2("MP") ' Sound
MP.Load(File.DirAssets, "Knock.mp3")
End Sub
Sub Panel1_Touch (Action As Int, X As Float, Y As Float)
MP.Play
End Sub