F
firstrose
Unregistered / Unconfirmed
GUEST, unregistred user!
我用TVideoCap和ACMWaveOut写程序。我按照TVideoCap采集的Audio格式打开了
ACM,但我在OnAudio里无法用playback放采来的数据!真是没有道理!请大家看看!
Procedure TMainForm.InitAudio;
Var
WaveForMatex:TWaveForMatex;
begin
WaveForMatex.wFormatTag:=1;
WaveForMatex.nChannels:=1;
WaveForMatex.nSamplesPerSec:=8000;
WaveForMatex.nAvgBytesPerSec:=WaveForMatex.nSamplesPerSec;
WaveForMatex.nBlockAlign:=1;
WaveForMatex.wBitsPerSample:=8;
ACMWaveOut.Open(@WaveForMatex);
end;
procedure TMainForm.VideoCapAudioStream(sender: TObject;
lpWHdr: PWaveHdr);
begin
ACMWaveOut.PlayBack(lpWhdr^.lpData,lpWhdr^.dwBytesRecorded);
end;
ACM,但我在OnAudio里无法用playback放采来的数据!真是没有道理!请大家看看!
Procedure TMainForm.InitAudio;
Var
WaveForMatex:TWaveForMatex;
begin
WaveForMatex.wFormatTag:=1;
WaveForMatex.nChannels:=1;
WaveForMatex.nSamplesPerSec:=8000;
WaveForMatex.nAvgBytesPerSec:=WaveForMatex.nSamplesPerSec;
WaveForMatex.nBlockAlign:=1;
WaveForMatex.wBitsPerSample:=8;
ACMWaveOut.Open(@WaveForMatex);
end;
procedure TMainForm.VideoCapAudioStream(sender: TObject;
lpWHdr: PWaveHdr);
begin
ACMWaveOut.PlayBack(lpWhdr^.lpData,lpWhdr^.dwBytesRecorded);
end;