◆ GetNextPreferredDevice()

virtual AKRESULT AK::StreamMgr::IAkFileLocationResolver::GetNextPreferredDevice ( AkAsyncFileOpenData in_FileOpen,
AkDeviceID io_idDevice 

Determines which device to use to open a file. If your File Resolver only handles one device, return AK_NotImplemented and the StreamMgr will use the only device configured. If it handles multiple devices, you can base the decision on where to get the file on any kind of heuristic: file extension, file name, access rights, CodecID, etc. The order in which devices are searched is left to the implementer. This function will always be called first with io_idDevice = AK_INVALID_DEVICE_ID.

  • AK_Success if there is a device to delegate the Open() call to. io_idDevice should be set to the proper AkDeviceID (as returned by AK::StreamMgr::CreateDevice).
  • AK_FileNotFound if all devices have been exhausted.
  • AK_NotImplemented if there is only one device in the system and file resolution is trivial.
This can be called from multiple threads.
in_FileOpenFile name and flags passed to the Open call.
io_idDeviceIn: last device used. Out: next device to use to open the file

Definition at line 435 of file AkStreamMgrModule.h.

References AK_NotImplemented.

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