버전

menu_open
virtual AKRESULT AK::StreamMgr::IAkFileLocationResolver::Open ( AkFileID  in_fileID,
AkOpenMode  in_eOpenMode,
AkFileSystemFlags in_pFlags,
bool &  io_bSyncOpen,
AkFileDesc io_fileDesc  
) [pure virtual]

Returns a file descriptor for a given file ID. Performs the operations needed to make the file descriptor usable by the other methods of the interface (for e.g. ask the OS for a valid file handle).

Returns:
  • AK_Success: A valid file descriptor is returned
  • AK_FileNotFound: File was not found.
  • AK_Fail: File could not be open for any other reason.
  • A file descriptor, which contains
    • an unique identifier to be used with functions of the low-level IO interface.
    • the total stream size in bytes.
    • the offset of the beginning of the file (in blocks).
    • a device ID, that was obtained through AK::StreamMgr::CreateDevice().
  • A file descriptor, that contains
    • an unique identifier to be used with functions of the low-level IO interface.
    • the total stream size in bytes.
    • the offset from the beginning of the file (in blocks).
    • a device ID, that was obtained through AK::StreamMgr::CreateDevice().
  • The updated io_bSyncOpen flag depending on the File Resolver's deferred opening policy.
Remarks:
  • Open() is always called first in the client thread.
  • If io_bSyncOpen is true, file opening must be executed now. If it is false, the File Location Resolver may choose whether it wants open it now, or later from the streaming device's thread. If it wishes to open it now, then it must set io_bSyncOpen to true. Otherwise, it needs to do the following: leave io_bSyncOpen to false, clear out_fileDesc::iFileSize and out_fileDesc::uSector, and set out_fileDesc::deviceID to the streaming device's ID that will handle this file. By returning io_bSyncOpen as false, the Stream Manager will interpret this as a request for deferred file opening, and this function will called again from the streaming device's thread (this time, with this io_bSyncOpen set to true).
  • All members of out_fileDesc will be cleared upon first call to Open().
Warning:
  • It is illegal to return io_bSyncOpen as false if Open() was called with io_bSyncOpen set to true.
  • Deferred file opening requires allocations in the Stream Manager's small object pool. The File Location Resolver should always choose to open files synchronously if it is fast to do so.
  • Whether opening is deferred or not, GetBlockSize() is always called right after the first call to Open(), in the client's thread, and is never called again.
Parameters:
in_fileID  File ID.
in_eOpenMode  Open mode.
in_pFlags  Special flags. Can pass NULL.
io_bSyncOpen  If true, the file must be opened synchronously. Otherwise it is left at the File Location Resolver's discretion. Return false if Open needs to be deferred.
io_fileDesc  Returned file descriptor.

이 페이지가 도움이 되었나요?

지원이 필요하신가요?

질문이 있으신가요? 문제를 겪고 계신가요? 더 많은 정보가 필요하신가요? 저희에게 문의해주시면 도와드리겠습니다!

지원 페이지를 방문해 주세요

작업하는 프로젝트에 대해 알려주세요. 언제든지 도와드릴 준비가 되어 있습니다.

프로젝트를 등록하세요. 아무런 조건이나 의무 사항 없이 빠른 시작을 도와드리겠습니다.

Wwise를 시작해 보세요