file_read

FMOD Studio API

Firelight Technologies FMOD Studio API

file_read

Helper function to read a file manually, that is preloaded with FMOD.FS_createPreloadedFile

JavaScript Syntax

FMOD.file_read(
  handle,         // (object) Handle returned by the FMOD.file_open function
  buffer,         // (number) A memory address that would come from an internal FMOD memory address, not an array or string type object declared in the JS scope.  See Remarks
  sizebytes,      // (number) Integer value with the number of bytes requested to be read from the file handle.
  bytesread_out   // (number) An integer with the number of bytes actually read is put in bytesread_out.val
);

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

'buffer' parameter is typically an object returned as the
1. buffer parameter of the FMOD_FILE_READ_CALLBACK
2. data parameter of the FMOD_CREATESOUNDEXINFO::pcmreadcallback,
3. buffer parameter of the FMOD_STUDIO_BANK_INFO::readcallback




Version 1.10.03 Built on Feb 1, 2018