Closed eitomurakami closed 5 months ago
added internal / audio-thread-call friendly global array setters in ffa7f1c299f2dc7c61799c4ac25352cda25753fa
t_CKBOOL set_global_int_array( const std::string & name, t_CKINT arrayValues[], t_CKUINT numValues );
t_CKBOOL set_global_int_array_value( const std::string & name, t_CKUINT index, t_CKINT value );
t_CKBOOL set_global_float_array( const std::string & name, t_CKFLOAT arrayValues[], t_CKUINT numValues );
t_CKBOOL set_global_float_array_value( const std::string & name, t_CKUINT index, t_CKFLOAT value );
also, added check for globals array access for valid global variable names in ae90d57ee9d420267b55b30a0531b84ee21e4056 (previously accessing an invalid name, or accessing it before the variable is created in the VM leads to a crash)
both issues (in RayTone and Pandora respectively) appear to be resolved with the above commits
Calling
setGlobalFloatArray
with a large array (1000+ elements) every audio block (~10 ms) can crash ChucK. Observed in RayTone (Chunity) and Pandora (C++).