L
liuaono1
Unregistered / Unconfirmed
GUEST, unregistred user!
var
fc:TACMFORMATCHOOSEA;
res:longint;
FormatWaveFormatEx;
procedure TForm1.Button1Click(Sender: TObject);
var
maxsizeformat:longint;
begin
acmMetrics(0, ACM_METRIC_MAX_SIZE_FORMAT, MaxSizeFormat);
getmem(Format, MaxSizeFormat);
Format^.wFormatTag :=$31;
//WAVE_FORMAT_GSM610;
set default format to GSM6.10
Format^.nChannels := 1;
//mono
Format^.nSamplesPerSec := 8000;
Format^.nAvgBytesPerSec:= 1625;
{ for buffer estimation }
Format^.nBlockAlign:=65;
{ block size of data }
Format^.wbitspersample := 0;
Format^.cbSize:=2;
ACMWaveOut1.Open(Format);
ACMWaveIn1.Open(Format);
........
end;
我想自己设置缺省的声音选项,可是以上程序段编译老是通不过,
显示“ problem creating playing handle32”
意即:系统试图以不被支持的波型格式打开设备
如若调用 format:=ACMDialog1.OpenDialog 则可通过,检查ACMDialog.pas 发现因为以下
一句调用了选择声音对话框,但不知怎样将它消除。(我只需该对话框的缺省值____见上值
,故不需要弹出对话框)
......
res:=acmFormatChoose(fc);
//display the ACM dialog box
result:=nil;
if res=MMSYSERR_NOERROR then
result:=fc.pwfx;
//return the pointer to waveformatex structure
......
烦劳各位大侠不吝指点。
fc:TACMFORMATCHOOSEA;
res:longint;
FormatWaveFormatEx;
procedure TForm1.Button1Click(Sender: TObject);
var
maxsizeformat:longint;
begin
acmMetrics(0, ACM_METRIC_MAX_SIZE_FORMAT, MaxSizeFormat);
getmem(Format, MaxSizeFormat);
Format^.wFormatTag :=$31;
//WAVE_FORMAT_GSM610;
set default format to GSM6.10
Format^.nChannels := 1;
//mono
Format^.nSamplesPerSec := 8000;
Format^.nAvgBytesPerSec:= 1625;
{ for buffer estimation }
Format^.nBlockAlign:=65;
{ block size of data }
Format^.wbitspersample := 0;
Format^.cbSize:=2;
ACMWaveOut1.Open(Format);
ACMWaveIn1.Open(Format);
........
end;
我想自己设置缺省的声音选项,可是以上程序段编译老是通不过,
显示“ problem creating playing handle32”
意即:系统试图以不被支持的波型格式打开设备
如若调用 format:=ACMDialog1.OpenDialog 则可通过,检查ACMDialog.pas 发现因为以下
一句调用了选择声音对话框,但不知怎样将它消除。(我只需该对话框的缺省值____见上值
,故不需要弹出对话框)
......
res:=acmFormatChoose(fc);
//display the ACM dialog box
result:=nil;
if res=MMSYSERR_NOERROR then
result:=fc.pwfx;
//return the pointer to waveformatex structure
......
烦劳各位大侠不吝指点。