I've been using B4A a month now and set up wav's to play using soundpool a hundred times. Ive never used a touch panel to get the X and Y before, always used clicks and buttons. I've tested touch panels different ways for two days, always coming up silent on the emulator or my Android tablet. Audio is checked in the libraries in the usual way. My sound is up and soundpool works in other programs. The Dims and initializing are correct. Even reducing the touch test to a bare minimum, there is no audible sound. The same dims and initializing work in other programs. Adding a button and subroutine to trigger a wav can't make a peep. The wavs used are short and work in other programs. They exist in this program's files and no errors show during compilation, or running. What simple thing am I missing? I see programs where touching the screen makes sounds all the time.The code below is all there is in the test after properly setting up the variables, initializing sound pool and loading the wav's correctly.
I set up buttons to make a click or beep noise all the time, it always works before.
I only have this problem when I create a panel with the touch response. So what gives? What's obvious to you that I don't understand?
B4X:
Sub Panel1_Touch (Action As Int, X As Float, Y As Float)
' The panel and bitmap I loaded as a background are showing fine now
' I can get the X and Y fine if I put code to check that here
' if I put a sp.play command here no sound is heard.
End Sub
Sub Panel1_Click
sp.Play(LoadID2, 1, 1, 1, 2, 1)
' I also tried it gamesoundID2 = sp.Play(LoadID2, 1, 1, 1, 2, 1)
' again I hear nothing. Yes the volume is up.
End Sub
Sub Exit_but_Click
gameoundID1 = sp.Play(LoadID1, 1, 1, 1, 0, 1) ' nothing is heard
'or sp.play(LoadID1,1,1,1,0,1) ...again nothing is audible.
MakeExit =2 ' a var I made up 'anticipating creating a turn off the program routine
End Sub
I set up buttons to make a click or beep noise all the time, it always works before.
I only have this problem when I create a panel with the touch response. So what gives? What's obvious to you that I don't understand?