Firelight Technologies FMOD Studio API
FMOD_FILE_OPEN_CALLBACK
Callback for opening a file.
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_FILE_OPEN_CALLBACK(
const char *name,
unsigned int *filesize,
void **handle,
void *userdata
);
Parameters
name
This is the filename passed in by the user. You may treat this as you like.
filesize
The size of the file to be passed back to fmod, in bytes.
handle
This is to store a handle generated by the user. This will be the handle that gets passed into the other callbacks. Optional but may be needed.
userdata
Userdata from FMOD_CREATESOUNDEXINFO.fileuserdata or FMOD_STUDIO_BANK_INFO.userData.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the FMOD_RESULT enumeration.
Remarks
Return the appropriate error code such as FMOD_ERR_FILE_NOTFOUND if the file fails to open. If the callback is from System::attachFileSystem, then the return value is ignored.
See Also
- System::setFileSystem
- System::attachFileSystem
- FMOD_FILE_CLOSE_CALLBACK
- FMOD_FILE_READ_CALLBACK
- FMOD_FILE_SEEK_CALLBACK
- FMOD_CREATESOUNDEXINFO
Version 1.10.03 Built on Feb 1, 2018