Firelight Technologies FMOD Studio API
Callback for opening a file.
FMOD_RESULT F_CALLBACK FMOD_FILE_OPEN_CALLBACK(
const char *name,
int unicode,
unsigned int *filesize,
void **handle,
void *userdata
);
name
This is the filename passed in by the user. You may treat this as you like.
unicode
Tells the callback if the string being passed in is a double byte unicode string or not. You may have to support this unless you know the target application will not support unicode.
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.
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.
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.
Version 1.03.06 Built on Apr 17, 2014