版本

menu_open
Wwise SDK 2019.2.15

◆ BatchWrite()

virtual AKRESULT AK::StreamMgr::IAkIOHookDeferred::BatchWrite ( AkUInt32  in_uNumTransfers,
BatchIoTransferItem in_pTransferItems,
AkBatchIOCallback  in_pBatchIoCallback,
AKRESULT io_pDispatchResults 
)
inlinevirtual

Write multiple data to multiple files (asynchronous).

备注
  • Queue up multiple write 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 write 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 write, or some set of writes 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 write that completes.
  • AK_Fail: At least one failure occurred when dispatching writes. 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::IAkIOHookDeferredBatch.

在文件 AkStreamMgrModule.h560 行定义.

引用了 AK_Fail, AK_Success, AK::StreamMgr::IAkIOHookDeferredBatch::BatchIoTransferItem::ioHeuristics, AK::StreamMgr::IAkIOHookDeferredBatch::BatchIoTransferItem::pFileDesc, AK::StreamMgr::IAkIOHookDeferredBatch::BatchIoTransferItem::pTransferInfo , 以及 Write().


此页面对您是否有帮助?

需要技术支持?

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

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

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

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

开始 Wwise 之旅