Earcons

NeoTechni

Well-Known Member
Licensed User
Longtime User
Anyone know how to do earcons using the TTS library?

ie: This lets you replace text like [click] with a wav file inside the sentence.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Try this (not tested):
B4X:
Sub AddEarcon(Earcon As String, Dir As String, FileName As String)
 Dim r As Reflector
 r.Target = TTS
 Log(r.RunMethod3("addEarcon", Earcon, "java.lang.String", File.Combine(Dir, FileName), _
 "java.lang.String")) '0 for SUCCESS, -1 for ERROR
End Sub
It will not work with asset files (not sure about internal files).
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…