if (dwRiff != mmioFOURCC ( R , I , F , F )) return FALSE. if (dwType != mmioFOURCC ( W , A , V , E )) return FALSE. file://寻找格式块,数据块位置及数据长度 pdwEnd = (DWORD *)((BYTE *) pdw dwLength - 4). while (pdw < pdwEnd){ dwType = *pdw . dwLength = *pdw . switch (dwType){ case mmioFOURCC( f , m , t , ): if (!m_pFormat){ if (dwLength < sizeof (WAVEFORMAT)) return FALSE. m_pFormat = (LPWAVEFORMATEX) pdw. if (m_pData &.&. m_dwSize) return TRUE. } break.
case mmioFOURCC( d , a , t , a ): if (!m_pData || !m_dwSize){ m_pData = (LPBYTE) pdw. m_dwSize = dwLength. if (m_pFormat) return TRUE. } break. } pdw = (DWORD *)((BYTE *) pdw ((dwLength 1) &.~ 1)). } file://未找到,返回FALSE return FALSE. }