W
wenwenbin
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.ACMWaveIn1Data(data: Pointer;
size: Integer);
var
pi, po: Pchar;
i: Integer;
List: TList;
zero: Integer;
PeakL, PeakR: Smallint;
BUF: array of Byte;
begin
zero := 0;
pi := data;
po := @Audiobuf;
po := po + AudioSize;
va_g729a_encoder(pi, po);
AudioSize := AudioSize + 10;
if AudioSize >= 3000 then
AudioSize := 0;
//pcmFindPeak(@PCMFOMAT, Data, Size, PeakL, PeakR);
//TrackBarMic.SelStart := 32767-ABS(PeakL);
if AudioSize <
60 then
exit;
setlength(BUF, AudioSize);
Move(AudioBuf, BUF[0], AudioSize);
IdUDPServer1.SendBuffer('192.168.1.189',4646,BUF[0], AudioSize);
AudioSize := 0;
end;
size: Integer);
var
pi, po: Pchar;
i: Integer;
List: TList;
zero: Integer;
PeakL, PeakR: Smallint;
BUF: array of Byte;
begin
zero := 0;
pi := data;
po := @Audiobuf;
po := po + AudioSize;
va_g729a_encoder(pi, po);
AudioSize := AudioSize + 10;
if AudioSize >= 3000 then
AudioSize := 0;
//pcmFindPeak(@PCMFOMAT, Data, Size, PeakL, PeakR);
//TrackBarMic.SelStart := 32767-ABS(PeakL);
if AudioSize <
60 then
exit;
setlength(BUF, AudioSize);
Move(AudioBuf, BUF[0], AudioSize);
IdUDPServer1.SendBuffer('192.168.1.189',4646,BUF[0], AudioSize);
AudioSize := 0;
end;