I'm attempting to set an array that is within a custom structure in Renderscript from Java.
Here is my struct:
typedef struct WorldState {
float time;
int galaxyRadius;
float angle;
int audioData[1024];
} WorldState_t;
Here is how I am attempting to set the array "audioData"
mScript.get_worldState().set_audioData(0, mAudioData, true);
This is the exception that is being thrown:
E/AndroidRuntime(8373): android.renderscript.RSIllegalArgumentException: Field packer sizelength 4096 does not match component size 4.
I only create a ScriptField_WorldState with size 1. From my understanding in the set_audioData method call, the first parameter needs to be 0 as there is only 1 WorldState element. I pass mAudioData which has a size of 1024.