• WinAPI: waveInGetDevCaps 查询输入设备的性能


    //声明:
    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}
    
    //举例:
  • 相关阅读:
    jQuery让渡$操作符
    JSON
    Jquery实现Ajax(二)
    Jquery实现Ajax(一)
    Javascript实现Ajax
    文章目录
    读过的书
    JVM笔记(5)-垃圾回收&内存分配策略
    JVM笔记(4)-对象及其引用
    JVM笔记(3)-内存结构&方法执行(栈帧)
  • 原文地址:https://www.cnblogs.com/del/p/1074224.html
Copyright © 2020-2023  润新知