Android Question About audiostreamer

Addo

Well-Known Member
Licensed User
Longtime User
can i insert some text to the audio data and then remove this text when receive ?


Code:
Sub AudioStream_RecordBuffer(Data() As Byte)
    
Dim packet As UDPPacket
packet.Initialize(Data, ip, port)
UDPSck.Send(packet)

End sub

i would like to add identification to each audio sent like example

Code:
packet.Initialize("Audio1"&Data, ip, port)
 
it takes a minute to build one.

Code:
    Type MyData(infostring As String, data() As Byte)
Code:
Sub AudioStream_RecordBuffer(Data() As Byte)
Dim s As B4XSerializator
dim mdata as MyData
mdata.initialize
mdata.infostring = "TEST"
mdata.data = Data
    
Dim packet As UDPPacket

packet.Initialize(s.ConvertObjectToBytes(mdata), ip, port)
UDPSck.Send(packet)

End sub

note that the receiving side must know the Customtype (and needs to be a B4X App).
 
Upvote 0
Back
Top