Function libpd_rs::array::resize_array
source · [−]Expand description
Resizes an array found by its name from the pd patch which is loaded.
Sizes <= 0
or > size limit
are clipped to 1
Example
use libpd_rs::array::{array_size, resize_array};
resize_array("my_array", 1024).unwrap();
let size = array_size("my_array").unwrap();
assert_eq!(size, 1024);
resize_array("my_array", 0).unwrap();
let size = array_size("my_array").unwrap();
assert_eq!(size, 1);
Errors
A list of errors that can occur: