Hi All
I have an App with a number of buttons which have the option of making a "click" sound when pressed. I have used Media Player and a sound file [7ms] to do this, however the "click" sound does not always work. It's operation is intermittent and unpredictable.
Possibly there is a better way to use Media Player or even a better way to make a button "click".
Any sugestions welcome.
Regards Roger
I have an App with a number of buttons which have the option of making a "click" sound when pressed. I have used Media Player and a sound file [7ms] to do this, however the "click" sound does not always work. It's operation is intermittent and unpredictable.
Possibly there is a better way to use Media Player or even a better way to make a button "click".
Any sugestions welcome.
Regards Roger
B4X:
Sub Process_Globals
Dim MP As MediaPlayer
Dim btnClick_flag As Int
Etc........
End Sub
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
MP.Initialize2("MP")
MP.Load(File.DirAssets,"click.wav")
Etc............
End If
End Sub
Sub AnyButton_Click
If btnClick_flag = 1 Then MP.Play
Etc..........
End Sub