版本

menu_open
警告:系统已根据您所用大版本 (2021.1.14.8108) 自动跳转至最新文档。若想访问特定版本的文档,请从 Audiokinetic Launcher 下载离线文档,并在 Wwise 设计程序中勾选 Offline Documentation 选项。
Wwise SDK 2021.1.14

◆ BatchRead()

virtual AKRESULT AK::StreamMgr::IAkIOHookDeferredBatch::BatchRead ( AkUInt32  in_uNumTransfers,
BatchIoTransferItem in_pTransferItems,
AkBatchIOCallback  in_pBatchIoCallback,
AKRESULT io_pDispatchResults 
)
pure virtual

Reads multiple data from multiple files (asynchronous).

备注
  • Queue up multiple read requests at once, using the provided array of in_pTransferItems. There will be in_uNumTransfers number of items in the array.
  • io_pDispatchResults will contain an in_uNumTransfers number of items in the array. Each item in io_pDispatchResults should be set to AK_Success if the corresponding Read was successfully dispatched, and set to AK_Failure otherwise. As well, the return value should be a cumulative result of the dispatches, where AK_Success indicates all requests were dispatched successfully, and io_pDispatchResults will not be investigated, whereas AK_Fail indicates at least one failure.
  • When a given Read, or some set of reads has completed - whether it was successful, cancelled, or failed - call in_pBatchIoCallback for the corresponding transfer. Pass in the list of AkAsyncIOTransferInfo objects to receive the callback, as well as a list of results for each transfer, e.g. AK_Success or some other AKRESULT. Do not call in_pBatchIoCallback for transfers that were not dispatched (as indicated by the corresponding value in io_pDispatchResults).
  • The pointer to each BatchIoTransferItem::pTransferInfo will be valid until the high-level device is notified through the callback. The array of in_pTransferItems will not be valid, though.
  • File position passed in each BatchIoTransferItem::pTransferInfo takes the offset of this file relative to AkFileDesc::hFile (described with AkFileDesc::uSector). It is computed by the high-level device as "pFileDesc->uSector * Block_Size + Stream_Position", where Block_Size is obtained via AK::StreamMgr::IAkLowLevelIOHook::GetBlockSize().
返回
  • AK_Success: All I/O requests were successfully dispatched. in_pBatchIoCallback must be called for each read that completes.
  • AK_Fail: At least one failure occurred when dispatching reads. The values of io_pDispatchResults should indicate which operation failed to be dispatched.
参数
in_uNumTransfers Number of transfers to process
in_pTransferItems List of transfer items to process
in_pBatchIoCallback Callback to execute to handle completion of multiple items simultaneously
io_pDispatchResults Output result codes to indicate if a transfer was successfully dispatched

AK::StreamMgr::IAkIOHookDeferred 内被实现.


此页面对您是否有帮助?

需要技术支持?

仍有疑问?或者问题?需要更多信息?欢迎联系我们,我们可以提供帮助!

查看我们的“技术支持”页面

介绍一下自己的项目。我们会竭力为您提供帮助。

来注册自己的项目,我们帮您快速入门,不带任何附加条件!

开始 Wwise 之旅