//声明:
waveInGetPosition(
  hWaveIn: HWAVEIN; {设备句柄}
  lpInfo: PMMTime;  {TMMTime 结构的指针}
  uSize: UINT       {TMMTime 结构大小}
): MMRESULT;        {成功返回 0; 可能的错误值见下:}

MMSYSERR_INVALHANDLE = 5;  {设备句柄无效}

//TMMTime 是 mmtime_tag 结构的重定义:
mmtime_tag = record
  case wType: UINT of
   TIME_MS:     (ms: DWORD);         {毫米}
   TIME_SAMPLES:(sample: DWORD);     {波形音频取样数}
   TIME_BYTES:  (cb: DWORD);         {波形音频字节数(字节偏移量)}
   TIME_TICKS:  (ticks: DWORD);      {TICK 数}
   TIME_SMPTE:(                      {动画及电视协会的 SMPTE 时间, 是个内嵌结构}
      hour: Byte;                {时}
      min: Byte;                 {分}
      sec: Byte;                 {秒}
      frame: Byte;               {帧}
      fps: Byte;                 {每秒帧数}
      dummy: Byte;               {填充字节(为对齐而用)}                  
      pad: array[0..1] of Byte); {}
    TIME_MIDI : (songptrpos: DWORD); {MIDI 时间}
end;

//使用 TMMTime 结构前, 应先指定 TMMTime.wType :
TIME_MS      = $0001; {默认; 打开或复位时将回到此状态}
TIME_SAMPLES = $0002;
TIME_BYTES   = $0004;
TIME_SMPTE   = $0008;
TIME_MIDI    = $0010;
TIME_TICKS   = $0020;

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