A few answers for myself:
* reaper.array is indeed an array of 64-bit doubles,
* except for the first 64 bits, which stores the array size and consists of two 32-bit long ints:
* The currently used size ({reaper.array}.resize) is stored in the the first int (the lower 32 bits, if the first entry is taken as one 64-bit long long int) and the maximum allocated size ({reaper.array}.get_alloc) and is stored in the second int / higher 32 bits.
reaper.arrays can be passed from ReaScript to C++ extension API as void*. However, the other direction doesn't work: when returning a pointer to a reaper.array as void*, REAPER doesn't recognize it as a reaper.array.
Therefore, if an API function is supposed to return information in the forms of a reaper.array, an existing reaper.array into which the API function may write should be included as one of the arguments.
If an extension declares a "double*" argument type in plugin_register(APIdef_funcName), REAPER translates this as "reaper.array" in the auto-generated website help and IDE context help. Unfortunately, if a script tries to pass a reaper.array for the argument, the IDE complains about wrong type.
|