注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

面包会有的

php asp 高端网站开发 微信网站开发 视频会议软硬件

 
 
 

日志

 
 

mmioDescend  

2011-11-15 00:53:15|  分类: 声音播放 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

The mmioDescend function descends into a chunk of a RIFF file that was opened by using themmioOpen function. It can also search for a given chunk.

本函数跳动入一个RIFF文件的一个块中。这个文件已经被mmioOpen函数打开,它也能搜索一个给定的块。

Syntax

MMRESULT mmioDescend(   HMMIO hmmio,   LPMMCKINFO lpck,   LPMMCKINFO lpckParent,   UINT wFlags ); 

/* RIFF chunk information data structure */ typedef struct _MMCKINFO {  FOURCC          ckid;           /* chunk ID */  DWORD           cksize;         /* chunk size */  FOURCC          fccType;        /* form type or list type */  DWORD           dwDataOffset;   /* offset of data portion of chunk */  DWORD           dwFlags;        /* flags used by MMIO functions */ } MMCKINFO, *PMMCKINFO, NEAR *NPMMCKINFO, FAR *LPMMCKINFO; typedef const MMCKINFO *LPCMMCKINFO;

块标志
块尺寸
结构类型或list类型
块的数据部分的偏移量
被MMIO函数使用的标志

Parameters

hmmio

File handle of an open RIFF file.

一个打开的RIFF文件的文件句柄

lpck

Pointer to a buffer that receives an MMCKINFO structure.

指秘一个缓冲区,它用来接收一个MMCKINFO结构

lpckParent

Pointer to an optional application-defined MMCKINFO structure identifying the parent of the chunk being searched for. If this parameter is not NULLmmioDescend assumes the MMCKINFOstructure it refers to was filled when mmioDescend was called to descend into the parent chunk, and mmioDescend searches for a chunk within the parent chunk. Set this parameter to NULL if no parent chunk is being specified.

指向一个可选的由应用程序定义的MMCKINFO结构,它标识这个正在搜索的块的父,如果这个参数不为NULL,本函数搜索一个块,局限于这个父块内部。设置这个参数为NULL,如果没有父块被指定。

wFlags

Search flags. If no flags are specified, mmioDescend descends into the chunk beginning at the current file position. The following values are defined.

搜索标志,如果没有标志被指定,本函数搜索这个块在当前文件位置。随后是被定义的值。

ValueMeaning
MMIO_FINDCHUNKSearches for a chunk with the specified chunk identifier.
MMIO_FINDLISTSearches for a chunk with the chunk identifier "LIST" and with the specified form type.
MMIO_FINDRIFFSearches for a chunk with the chunk identifier "RIFF" and with the specified form type.

 

Return value

Returns MMSYSERR_NOERROR if successful or an error otherwise. Possible error values include the following.

Return codeDescription
MMIOERR_CHUNKNOTFOUND

The end of the file (or the end of the parent chunk, if given) was reached before the desired chunk was found.

 

Remarks

注意

A "RIFF" chunk consists of a four-byte chunk identifier (type FOURCC), followed by a four-byte chunk size (type DWORD), followed by the data portion of the chunk, followed by a null pad byte if the size of the data portion is odd. If the chunk identifier is "RIFF" or "LIST", the first four bytes of the data portion of the chunk are a form type or list type (type FOURCC).

一个“RIFF”块由一个四字节块标识,和随后的一个四字节块尺寸构成。随后是块的数据部分。再往后是一个null字节,如果数据部分的大小是奇数。如果块标识是"RIFF"或"LIST",块的数据部分的第一个四字节是一个结构类型或者list类型。


If you use mmioDescend to search for a chunk, make sure the file position is at the beginning of a chunk before calling the function. The search begins at the current file position and continues to the end of the file. If a parent chunk is specified, the file position should be somewhere within the parent chunk before calling mmioDescend. In this case, the search begins at the current file position and continues to the end of the parent chunk.

如果你使用本函数去搜索一个块,确定文件位置是在一个块的开始部分。搜索从当前文件位置然后到文件的结尾。如果一个父块被指定,呼叫本函数前,文件位置应该是父块中的某处,在这种情况下,搜索赔开始于当前文件位置,直到父块的结尾。


If mmioDescend is unsuccessful in searching for a chunk, the current file position is undefined. IfmmioDescend is successful, the current file position is changed. If the chunk is a "RIFF" or "LIST" chunk, the new file position will be just after the form type or list type (12 bytes from the beginning of the chunk). For other chunks, the new file position will be the start of the data portion of the chunk (8 bytes from the beginning of the chunk).

如果本函数搜索一个块时未成功,当前文件位置是不明确的。如果本函数成功,当前文件位置被改变。如果块是一个“RIFF”块或“LIST”块,新的文件位置将是格式类型或list类型(从这个块开始的12字节)后,对于其它块,新的文件位置将是这个块的数据开始部分。


本函数填充MMCKINFO结构,这个结构由lpck参数指定,用随后的信息。

The mmioDescend function fills the MMCKINFO structure pointed to by the lpck parameter with the following information:

  • The ckid member is the chunk. If the MMIO_FINDCHUNK, MMIO_FINDRIFF, or MMIO_FINDLIST flag is specified for wFlags, the MMCKINFO structure is also used to pass parameters tommioDescend. In this case, the ckid member specifies the four-character code of the chunk identifier, form type, or list type to search for.
  • The cksize member is the size, in bytes, of the data portion of the chunk. The size includes the form type or list type (if any), but does not include the 8-byte chunk header or the pad byte at the end of the data (if any).
  • The fccType member is the form type if ckid is "RIFF", or the list type if ckid is "LIST". Otherwise, it is NULL.
  • The dwDataOffset member is the file offset of the beginning of the data portion of the chunk. If the chunk is a "RIFF" chunk or a "LIST" chunk, this member is the offset of the form type or list type.
  • The dwFlags member contains other information about the chunk. Currently, this information is not used and is set to zero.

Requirements

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Header

Mmsystem.h (include Windows.h)

Library

Winmm.lib

DLL

Winmm.dll

 

 

Send comments about this topic to Microsoft

Build date: 9/7/2011

  评论这张
 
阅读(1175)| 评论(1)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017