?? ipunit.pas
字號:
unit ipunit;
interface
uses
Windows, SysUtils, Classes, Controls, Forms,
ACMWaveOut,mmsystem, ACMWaveIn, ACMDialog, StdCtrls, UDPSock,
Wall, Graphics, ExtCtrls, ComCtrls;
type
TForm1 = class(TForm)
ACMDialog1: TACMDialog;
ACMWaveIn1: TACMWaveIn;
ACMWaveOut1: TACMWaveOut;
Button1: TButton;
Button2: TButton;
UDPSock1: TUDPSock;
Edit1: TEdit;
Wallpaper1: TWallpaper;
Label1: TLabel;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure ACMWaveIn1Data(data: Pointer; size: Integer);
procedure UDPSock1Recv(data: PChar; delka: Integer; host: String);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
var format:pointer;
begin
UDPsock1.RemoteIP:=edit1.text;
format:=ACMDialog1.OpenDialog;
if format=nil then exit;
UDPSock1.Start;
ACMWaveOut1.Open(format);
ACMWaveIn1.Open(format);
Button1.Enabled:=false;
Button2.Enabled:=true;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
ACMWaveIn1.Close;
ACMWaveOut1.Close;
UDPSock1.Stop;
Button1.Enabled:=true;
Button2.Enabled:=false;
end;
procedure TForm1.ACMWaveIn1Data(data: Pointer; size: Integer);
begin
UDPSock1.Send(data,size);
end;
procedure TForm1.UDPSock1Recv(data: PChar; delka: Integer; host: String);
begin
ACMWaveOut1.PlayBack(data,delka);
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -