//声明:
waveInGetDevCaps(
  hwo: HWAVEOUT;       {输入设备ID; HWAVEIN ?}
  lpCaps: PWaveInCaps; {TWaveInCaps 结构的指针, 用于接受设备信息}
  uSize: UINT          {TWaveInCaps 结构大小}
): MMRESULT;           {成功返回 0; 可能的错误值见下:}

MMSYSERR_BADDEVICEID = 2; {设备ID超界}
MMSYSERR_NODRIVER    = 6; {没有安装驱动程序}

//TWaveInCaps 是 tagWAVEINCAPSA 结构的重定义:
tagWAVEINCAPSA = record
  wMid: Word;                                   {制造商ID}
  wPid: Word;                                   {产品ID}
  vDriverVersion: MMVERSION;                    {版本号; 高字节是主版本号, 低字节是次版本号}
  szPname: array[0..MAXPNAMELEN-1] of AnsiChar; {产品名称}
  dwFormats: DWORD;                             {支持的格式}
  wChannels: Word;                              {单声道(1)还是立体声(2)}
  wReserved1: Word;                             { structure packing }
end;

//dwFormats:
WAVE_INVALIDFORMAT = $00000000; {invalid format}
WAVE_FORMAT_1M08   = $00000001; {11.025 kHz, Mono,   8-bit }
WAVE_FORMAT_1S08   = $00000002; {11.025 kHz, Stereo, 8-bit }
WAVE_FORMAT_1M16   = $00000004; {11.025 kHz, Mono,   16-bit}
WAVE_FORMAT_1S16   = $00000008; {11.025 kHz, Stereo, 16-bit}
WAVE_FORMAT_2M08   = $00000010; {22.05  kHz, Mono,   8-bit }
WAVE_FORMAT_2S08   = $00000020; {22.05  kHz, Stereo, 8-bit }
WAVE_FORMAT_2M16   = $00000040; {22.05  kHz, Mono,   16-bit}
WAVE_FORMAT_2S16   = $00000080; {22.05  kHz, Stereo, 16-bit}
WAVE_FORMAT_4M08   = $00000100; {44.1   kHz, Mono,   8-bit }
WAVE_FORMAT_4S08   = $00000200; {44.1   kHz, Stereo, 8-bit }
WAVE_FORMAT_4M16   = $00000400; {44.1   kHz, Mono,   16-bit}
WAVE_FORMAT_4S16   = $00000800; {44.1   kHz, Stereo, 16-bit}

//举例:
posted on 2008-02-20 00:03  万一  阅读(5156)  评论(0编辑  收藏  举报