ACM问题(100)

  • 主题发起人 主题发起人 菜鸟黄
  • 开始时间 开始时间

菜鸟黄

Unregistered / Unconfirmed
GUEST, unregistred user!
请各位大侠帮我解释下以下代码(每步实现的功能)procedure TACMWaveOut.PlayBack(data:pointer;size:longint);varHeader:PWaveHdr;memblock:pointer;i:integer;
begin
if HWaveOut1<>nil then
begin
header:=new(PWaveHdr);
memblock:=new(pointer);
getmem(memblock,size);
move(data^,memBlock^,size);
header.lpdata:=memBlock;
header.dwbufferlength:=size;
header.dwbytesrecorded:=size;
header.dwUser:=0;
header.dwflags:=0;
header.dwloops:=0;
i:=WaveOutPrepareHeader(HWaveOut1^,header,sizeof(TWaveHdr));
if i<> 0 then
showmessage('WaveOutPrepareHeader error');
i:=WaveOutWrite(HWaveOut1^,header,sizeof(TWaveHdr));
if i<> 0 then
showmessage('WaveOutWrite error');
end;
 
后退
顶部