Wwise SDK 2023.1.4
AK::StreamMgr::IAkLowLevelIOHook Class Referenceabstract

#include <AkStreamMgrModule.h>


struct  BatchIoTransferItem

Public Member Functions

virtual AKRESULT Close (AkFileDesc *in_pFileDesc)=0
virtual AkUInt32 GetBlockSize (AkFileDesc &in_fileDesc)=0
virtual void GetDeviceDesc (AkDeviceDesc &out_deviceDesc)=0
virtual AkUInt32 GetDeviceData ()=0
virtual void BatchOpen (AkUInt32 in_uNumFiles, AkAsyncFileOpenData **in_ppItems)=0
virtual void BatchRead (AkUInt32 in_uNumTransfers, BatchIoTransferItem *in_pTransferItems)=0
virtual void BatchWrite (AkUInt32 in_uNumTransfers, BatchIoTransferItem *in_pTransferItems)=0
virtual void BatchCancel (AkUInt32 in_uNumTransfers, BatchIoTransferItem *in_pTransferItems, bool **io_ppbCancelAllTransfersForThisFile)=0
virtual AKRESULT OutputSearchedPaths (AKRESULT in_result, const AkFileOpenData &in_FileOpen, AkOSChar *out_searchedPath, AkInt32 in_pathSize)
 This function is called to provide information when file related errors occur. The base paths known by this IO hook should be returned in out_searchedPath. More...

Protected Member Functions

virtual ~IAkLowLevelIOHook ()
 Virtual destructor on interface to avoid warnings. More...

Detailed Description

Interface for batched deferred low-level I/O transfers. This I/O transfer handshaking method is preferred when you want to hook I/O to your own I/O streaming technology, and you want to submit multiple I/O requests in one call, so as to allow for better opportunities for CPU and I/O performance. All operations in this interface will be happening in the device's own thread, separate from the main audio thread. Also, it is assumed that all operations are asynchronous although immediate resolution is also supported. You may queue them into your own system, and even use the heuristics passed down to this level for your convenience. Note that the requests are always sent in the order that the Stream Manager considers to be the most appropriate. You may receive less than AkDeviceSettings::uMaxConcurrentIO at any given time. The number of concurrent transfers depends on the number of streams running in the high-level streaming device, and on its target buffering length and granularity. Your advantage at this level is to be aware of file placement, so you may try to re-order requests in order to minimize seeking on disk. Calls to BatchRead()/BatchWrite() should return as soon as possible. You need to call AkAsyncIOTransferInfo::pCallback for all individual items in a transfer batch. Cancel() is provided in order to inform you that the streaming device will flush this transfer upon completion. You may implement it or not. In all cases, you must call the callback.

Definition at line 244 of file AkStreamMgrModule.h.

Was this page helpful?

Need Support?

Questions? Problems? Need more info? Contact us, and we can help!

Visit our Support page

Tell us about your project. We're here to help.

Register your project and we'll help you get started with no strings attached!

Get started with Wwise