setValue

FMOD Studio API

Firelight Technologies FMOD Studio API

setValue

Writes a value to memory managed by FMOD. This sort of value is typically sound data that is passed to the user as an 'address' which is internal to FMOD. This avoids duplication of large buffers which waste memory, because everything is passed by reference in JS.

JavaScript Syntax

FMOD.setValue(
  address,             // Memory address returned by an FMOD function.  See remarks.
  value,               // (number) A value which can be an integer or a real/floating point number.
  format               // (string) A format 'string' which identifies which type of value it is.  See Remarks
);

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

See https://kripken.github.io/emscripten-site/docs/api_reference/preamble.js.html#accessing-memory for docs on setValue.
'address' is a memory address, and only FMOD functions will return a memory address. Examples of this would be
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
'format' can be values like 'i8', 'i16', 'i32', 'i64', 'float', 'double' typically.




Version 1.10.03 Built on Feb 1, 2018