Tema: UDP Ayuda.
Ver Mensaje Individual
  #3  
Antiguo 29-10-2003
Descendents Descendents is offline
Miembro
 
Registrado: may 2003
Ubicación: Barcelona
Posts: 396
Reputación: 24
Descendents Va por buen camino
SI Quizas tienes razón.
Bueno mi problema es el siguiente.
Quiero enviar Por UDPClient ( el componente de las INDY), la siguiente informacion:

UDPC.SendBuffer(data^,size);

//EVENTO DE CUANDO HABLO
procedure TForm1.ACMWaveIn1Data(data: Pointer; size: Integer);
begin
UDPC.SendBuffer(data^,size);
end;

este es un evento que me recoje la voz cuando hablo por el micro.
Pues bien yo quiero enviar como ya he dicho antes el data:Pointer y el size:integer.

Diria que con ^ ya lo he conseguido, (porque antes hacia
UDPC.SendBuffer(data,size) y me daba error ahora envio UDPC.SendBuffer(data^,size) y ya no me da error ).

Pero ahora me encuentro que al recibir el UDPSERVER (de las indy), me llega un adata:Tstream;

// EVENTO DE CUANDO RECIBO
procedure TForm1.UDPSUDPRead(Sender: TObject; AData:TStream; ABinding: TIdSocketHandle);

Y la funcion que me reproduce el sonido es la siguiente:
ACMWaveOut1.PlayBack(data:Pointer,size:Integer);

Necesito poder reproducir lo que me llega pasandolo por la funcion ACMWaveOut1.PlayBack .Pasar el Tstream a pointer o algo asi.


Haber si alguien puede ayudarme.
En definitiva es voz por IP.que no se como enviarlo y reproducirlo correctamente.

Muchas gracias
Responder Con Cita