Android Question Problem with time in Beeper - Audio

MarcoRome

Expert
Licensed User
Longtime User
Hi all :)
I have this problem. If you put in variable tempo example 10000 ( 10 second or less ) all work in perfect mode, but if you need more time example 20 minute's ( 1200000 ) is very slow when i press Button1 i wait also 10 second first that this start work. Why ??
B4X:
Sub Process_Global
Dim suono As Beeper
End Sub
.....
dim freq as int  = 1500 '--> Hz
dim tempo as int = 1200000 ' --> 20 Minute's
 
Sub Button1_Click
If Button1.Text = "OFF" Then
suono.Release
Button1.Text = "ON"
Else
suono.Initialize(tempo, freq) 'milliseconds, hz
suono.Beep
Button1.Text = "OFF"
End If
End Sub

Thank to all in advance.
 

udg

Expert
Licensed User
Longtime User
Hi Marco,

did you read this post?
One smart way to solve this issue could be the initializing of two beepers, one for the desidered sound and the other for a "mute" sound.
In your button click you will just beep the one beeper you need for the proper action.

Umberto
 
Upvote 0
Top