09-19-2019, 09:13 AM
i have the following code
i want to add a text identification to each audio sent and then remove that text when its received
like following as example
how to do this in correct way
Code:
procedure Tform1.rData(Sender: TObject; const Buffer: Pointer;
BufferSize: Cardinal; var FreeIt: Boolean);
var
Bytes: TIdBytes;
begin
if (Buffer <> nil) and (BufferSize > 0) And (udpreciver.Active) then
begin
udpsender.SendBuffer(ip, port, RawToBytes(Buffer^, Buffersize));
end;
end;
i want to add a text identification to each audio sent and then remove that text when its received
like following as example
Code:
if (Buffer <> nil) and (BufferSize > 0) And (udpreciver.Active) then
begin
udpsender.SendBuffer(ip, port, RawToBytes('Audio1'+Buffer^, Buffersize));
end;
how to do this in correct way