バージョン

menu_open
Wwise SDK 2021.1.14

◆ BatchWrite()

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

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::IAkIOHookDeferredで実装されています。


このページはお役に立ちましたか?

サポートは必要ですか?

ご質問や問題、ご不明点はございますか?お気軽にお問い合わせください。

サポートページをご確認ください

あなたのプロジェクトについて教えてください。ご不明な点はありませんか。

プロジェクトを登録していただくことで、ご利用開始のサポートをいたします。

Wwiseからはじめよう